Difference between revisions of "Qubot Facebook Integration"

From QuData
Jump to navigation Jump to search
(Slavinsky moved page Qubot Facebook Integration to Qubot Facebook Integration/ru: localization)
Tag: New redirect
 
m (Removed redirect to Qubot Facebook Integration/ru)
Tag: Removed redirect
 
Line 1: Line 1:
#REDIRECT [[Qubot Facebook Integration/ru]]
+
[[Category:Qubot]]
 +
[[Category:Integrations|F]]
 +
<span id="qubot-facebook-integration"></span>
 +
{{TOCright}}
 +
== 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.
 +
<br>
 +
<br>
 +
[[File:FacebookStep1.png|700px]]
 +
<br>
 +
<br>
 +
Click the Create App button, then select an app type Business.
 +
<br>
 +
<br>
 +
[[File:FacebookStep1_2.png|700px]]
 +
<br>
 +
<br>
 +
Enter all the relevant details for your app and click Create App.
 +
<br>
 +
<br>
 +
[[File:FacebookStep1_3.png|700px]]
 +
<br>
 +
<br>
 +
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.
 +
<br>
 +
<br>
 +
[[File:FacebookStep1_4.png|700px]]
 +
<br>
 +
<br>
 +
 
 +
== 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 .
 +
<br>
 +
<br>
 +
[[File:FacebookStep2.png|700px]]
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_2.png|700px]]
 +
<br>
 +
<br>
 +
Select your bot, in the left pane select Integrations. Next, select Messenger.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_6.png|700px]]
 +
<br>
 +
<br>
 +
Select Step 2 and enter your access token in the field.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_7.png]]  [[File:FacebookStep2_8.png|500px]]
 +
<br>
 +
<br>
 +
Navigate to the Main Settings menu then select Basic Settings, capture the App ID and App Secret and enter it below.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_3.png|700px]]
 +
<br>
 +
<br>
 +
Enter them into the appropriate fields in Step 2 of your bot.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_9.png]]  [[File:FacebookStep2_10.png]]
 +
<br>
 +
<br>
 +
From your Facebook account, navigate to the Facebook page you have selected above. Locate the About menu.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_4.png|700px]]
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
[[File:FacebookStep5.png|700px]]
 +
<br>
 +
<br>
 +
Copy Page ID and enter it below and enter them into the appropriate fields in Step 2 of your bot.
 +
<br>
 +
<br>
 +
[[File:FacebookStep2_11.png]]
 +
<br>
 +
<br>
 +
 
 +
== 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.
 +
<br>
 +
<br>
 +
[[File:FacebookStep3.png|700px]]
 +
<br>
 +
<br>
 +
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.
 +
<br>
 +
<br>
 +
[[File:FacebookStep3_2.png|700px]]
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
[[File:Facebook3_3.png|700px]]
 +
<br>
 +
<br>
 +
 
 +
== Step 4 ==
 +
 
 +
Submit the Facebook app for approval.
 +
<br>
 +
<br>
 +
[[File:FacebookStep4.png|700px]]
 +
<br>
 +
<br>
 +
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 .

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.

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 .