At TARS we believe you should be able to make a bot once and deploy it to several platforms simultaneously.

That is why we have added the ability for makers to deploy their bots to Facebook Messenger.

The process for deploying your bot to messenger is slightly different from deploying to the web so here is an explanation (don’t worry its mostly pictures).

First, you will need to create a Facebook Page which the bot will be linked to. If your business has a Facebook page already, you can use that page itself. If you need to create a new one, you can find this in the left side menu of Facebook:

Once the page is created, you will have to log in to Facebook for developers:

Once logged in, you will have to create an app in the top right drop down where it says "My Apps" and you can see your profile picture:

Give the app a name and set your email id:

Once this is complete you will be taken to the "Add Product" page that looks like this:

You will need to add the Messenger product:

Once this has been added you will be greeted by the Messenger product page for your app:

Scroll down to the token generation section and link the page that you want associated with this bot :

Once the page is linked you will get a Page Access Token:

Now go to the Facebook page and retrieve the Page ID. You will find it in the about section of the page:

Now open up your bot in Tars Bot builder and go to the Distribute/Share Section section and add the Page ID and Page Access Token in the given fields:

Click the Deploy Bot on Facebook Messenger button and you will be given a FB Webhook URL and FB Verify Token.

Go back to the Facebook Developer page, scroll to the Webhooks section and click "Setup Webhooks" :

Add the FB Webhook URL and FB Verify Token generated in the bot builder into the given fields and subscribe for the following messaging events: message_deliveries, messages, messaging_optins, messaging_postbacks.

Now you will need to subscribe the Webhook to the Page:

At this point your messenger bot has been deployed BUT only for yourself to use. If you want this to be open to the public, you will have to send it for review. We have created instructions to submit Messenger Bot for review over here.

Did this answer your question?