Facebook Channel Setup
Version: 4.1.x
Prerequisites
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 a Bot"
Creating the bot including the facebook channel
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:
Deploy your bot as described in the Creating a bot 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/!
Go to https://developers.facebook.com/apps/
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