In order to set up a bot including a facebook channel you need to have set up the following prerequisites:
Set up a Facebook Page https://www.facebook.com/business/learn/set-up-facebook-page
​
Set up a Facebook App https://developers.facebook.com/docs/apps/register
​
Go through the bot creation process but stop before the last step "Creating you first ChatBot"
Go to https://developers.facebook.com​
Log in with your Facebook account and go to your already created app
Click on Add Product in the menu and select Messenger
Generate the page access token
Make a POST to /botstore/bots
with a JSON
like this:
{ "packages": [ "eddi://ai.labs.package/packagestore/packages/?version=1" ], "channels": [ { "type": "eddi://ai.labs.channel.facebook", "config": { "appSecret": "", "verificationToken": "", "pageAccessToken": "" } } ] }
Deploy your bot as described in the "Creating you first ChatBot" page!
After deployment your webhook URL
will look like this:
https://<hostname>/channels/facebook/
<BOT_ID>
?version=1
VERY IMPORTANT! The URL needs to be
https
and the certificate needs to be an actual certificate of a valid certification agency. For free certificates have a look here:https://letsencrypt.org
​
Click on Messenger in the menu and open the webhook
setup.
Enter your bot URL and the verification token
that you entered when creating the bot and add messages as a subscription
Deploy your Facebook app and the bot is live!