Note: This also applies for Facebook Workplace
Facebook is a constantly evolving platform, nominally you can find everything you need to create a bot on their platform page, but that information is subject to change.
Once installed, you will need to do steps 2-4, and steps 5 in parallel. It helps to have your development enviroment and the Facebook for Developers page open at the same time.
Visit Facebook for Developers page and create a new app.
- Select a Messenger application
Scroll down to
If you have not yet created your page yet, you can go ahead and do this now, or associate this new bot with an existing page.
Page Access Token, you'll need it when running your bot.
Setup Webhooks to link this application to your Botkit instance.
The callback url will be
https://YOURURL/api/messages. This URL must be publically available, and SSL-secured. More information on this can be found in the next step.
You will also need to define a
Verify Token for your page subscription. This is a user-defined string that you will keep secret and pass in with your environment variables.
Run your application with your environment variables set:
page_token- Your Page Access Token (required)
verify_token- Your Verify Token (required)
If your application has been configured correctly, you will be able to talk to your bot through the page you specified in Step 3. Congratulations!
- Botkit Facebook readme
- Botkit Facebook Starter Kit
- Messenger Platform Documentation
- Submit your bot so it can be publically available
Is something missing or out of date?
This file is managed on Github. click here to view the source, and send us a pull request with your improvements!