Wednesday, September 10, 2014

test

BOT libre enables you to embed your bot on your own website. It is quite easy to embed a bot, and only takes a few lines of HTML code.
You can embed a bot on your website to provide help or service, to provide information, or just for fun.

The embedding HTML code can be copied from your bot's Embed page under Admin.

The simplest solution is to embed your bot inside your webpage using an iframe. This just displays embedded content directly from the BOT libre website inside your webpage. The Embed page provides lots of options that let you customize the embedded content, such as changing the background color, changing the prompt and button text, or even providing your own CSS style sheet.

Another option is to access the BOT libre web API from your website's server (PHP/Java/etc.), or to access the web API from JavaScript. Using the API directly gives you complete control over the interface to your bot. BOT libre now provides an open JavaScript SDK that makes embedding and accessing a bot using JavaScript a lot easier.

To BOT libre JavaScript SDK is provided as open source under Project libre on GitHub and SourceForge. The BOT libre SDK includes a Java and Android SDK and components, and now includes a JavaScript SDK.

To add the BOT libre JavaScript SDK to your webpage you just need to import it in your webpage's <head> section.

The SDK provides several components that lets you access BOT libre's services including:

To embed your chat bot you can either use the SDKConnection directly, or use the WebChatbotListener to link the API to an HTML form in your webpage. Using WebChatbotListener is the easiest solution, the following code demonstrates how to create a form and link it using JavaScript.

Examples embedding JavaScript and HTML

Try it out now live

The above script was included in this page to enable you to talk with Brain Bot.