HTML Message Client

Bot owners can embed a bot-connected messaging client on a website using the HTML Client feature. The HTML Client does not connect to Facebook.

Setting up an HTML client is very easy. Click on the HTML Client tab in the Settings of your bot. Select where you would like the chat window to appear on a page, the color, and the icon. Then Save to activate the client.

Copy the embed code and place it anywhere in your HTML page, and you’re done.

../_images/html-client-tab.png

Known Bugs in HTML Client

Embed Code

The embed currently displayed on the HTML client page is wrong. Use the following instead.

<div id="botcentral-chatapp"></div>
<script type="text/javascript">
  var s = document.createElement('script');
  s.type = 'text/javascript';
  s.async = true;
  s.src = 'https://s3-us-west-2.amazonaws.com/agent.botcentralapi.com/assets/app.js';
  var embedder = document.getElementById('botcentral-chatapp');
  embedder.className = 'BOT_ID_HERE';
  embedder.parentNode.insertBefore(s, embedder);
</script>

In place of BOT_ID_HERE, get the ID from the embed code shown in the app.

../_images/html-client-embed-id-highlight.png

Facebook Connection

Currently, you can not access the HTML Client tab if your bot is not connected to a Facebook page.

Enabling HTML Client

Your HTML client will not work until you Save the settings in the HTML Client tab at least once.