Embedding your bot on your own website with the Bot Libre JavaScript SDK |
Bot Libre enables you to embed chat bots, live chat, chatrooms, and forums on your own website. It is quite easy to embed content, and only takes a few lines of HTML code. You can embed content on your website to provide help or customer service, to provide information, or just for fun. The embedding HTML code can be copied from your bot/channel/forum's Embed page under Admin.
The simplest solution is to embed content inside your webpage using an 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 content. Bot Libre now provides an open JavaScript SDK that makes embedding and accessing a bot using JavaScript a lot easier. The Bot Libre JavaScript SDK is provided as open source under Bot Libre on GitHub and SourceForge. The Bot Libre 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 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. Example embedded chat bot using JavaScript and HTML
Try it out now liveThe above script was included in this page to enable you to talk with Paphus.
So that's it, you should now be able to embed your bot on your website or blog using JavaScript. |
|||
|
|||
|