Qubot Facebook Integration En

From QuData
Revision as of 13:16, 27 June 2022 by Slavinsky (talk | contribs) (Protected "Qubot Facebook Integration En" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Connecting a bot to Facebook

To set up Facebook Messenger as a channel, developers will need to create an app on Facebook, enable webhook integration for the platform to send and receive messages, and subscribe the app to a Facebook page.

Step 1

Create an App.

Login to the Facebook developer portal(https://developers.facebook.com/) and go to My Apps.

FacebookStep1.png

Click the Create App button, then select an app type Business.

FacebookStep1 2.png

Enter all the relevant details for your app and click Create App.

FacebookStep1 3.png

Your App will be created and you will be redirected to the App setup page.


Choose Messenger and click the Set up button to continue. You will be redirected to the Settings page.

FacebookStep1 4.png

Step 2

Get Page Details.

Associate a page with the app and generate the Page Access Token from the Token Generation section. If you do not have a page, you can create a Facebook page here - https://www.facebook.com/pages/create .

FacebookStep2.png



FacebookStep2 2.png

Select your bot, in the left pane select Integrations. Next, select Messenger.

FacebookStep2 6.png

Select Step 2 and enter your access token in the field.

FacebookStep2 7.png FacebookStep2 8.png

Navigate to the Main Settings menu then select Basic Settings, capture the App ID and App Secret and enter it below.

FacebookStep2 3.png

Enter them into the appropriate fields in Step 2 of your bot.

FacebookStep2 9.png FacebookStep2 10.png

From your Facebook account, navigate to the Facebook page you have selected above. Locate the About menu.

FacebookStep2 4.png



FacebookStep5.png

Copy Page ID and enter it below and enter them into the appropriate fields in Step 2 of your bot.

FacebookStep2 11.png

Step 3

Setup Webhook.

Enable this channel to start the webhook setup process. Click the switch in the top right to activate the channel. Once the channel is activated, the webhook integration is enabled automatically.

FacebookStep3.png

Navigate to the Messenger Settings menu and scroll down to the Webhooks section. Under the Webhooks section, select the page you have used to generate the page token and click on Add subscriptions. Check the following subscription fields: messages, messaging_postbacks, message_deliveries, message_reads.

Save the changes.

FacebookStep3 2.png



Facebook3 3.png

Step 4

Submit the Facebook app for approval.

FacebookStep4.png

Once approved, you can enable the Facebook Messenger channel for your bot. For more info on how to submit the app, visit here - https://developers.facebook.com/docs/messenger-platform/app-review#submission .