Difference between revisions of "Qubot Facebook Integration En"
(Created page with "Category:Qubot F <span id="qubot-facebook-integration"></span> {{TOCright}} == Connecting a bot to Facebook == To set up Facebook Messenger as a...") |
m (Protected "Qubot Facebook Integration En" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(No difference)
| |
Latest revision as of 13:16, 27 June 2022
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.
Click the Create App button, then select an app type Business.
Enter all the relevant details for your app and click Create App.
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.
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 .
Select your bot, in the left pane select Integrations. Next, select Messenger.
Select Step 2 and enter your access token in the field.
Navigate to the Main Settings menu then select Basic Settings, capture the App ID and App Secret and enter it below.
Enter them into the appropriate fields in Step 2 of your bot.
From your Facebook account, navigate to the Facebook page you have selected above. Locate the About menu.
Copy Page ID and enter it below and enter them into the appropriate fields in Step 2 of your bot.
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.
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.
Step 4
Submit the Facebook app for approval.
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 .