Here is a step-by-step tutorial on how to connect a chatbot to your Facebook page.
Create a new bot
Create a chatbot on the Clustaar app by clicking on the “Create a new bot” button.
Give him a name
Then click the “Continue” button!
Select Messenger channel
After you create your project, select the Messenger channel.
This is recommended because it will allow you to have access to specific Messenger features, like Quick Replies or Cards.
If you didn’t select a channel at the beginning, you can choose one in the “Channels” tab of your platform. You can also add new channels and make it a multichannel chatbot.
If you click on the Facebook tab, you will see a form opening on the right.
Next, log in to Facebook.
Create your developer account
(Pass this step if you already have one.)
Go to https://developers.facebook.com/apps, and click on “Login” on the top right.
Fill out this form, then follow these steps:
If you have an account, create a new app.
Give a name to your app, then click “Create App ID“.
Complete and validate the process.
Select the Messenger product by clicking on “Set Up“.
Now your app is created on Messenger!
Create the Page Access Token
To make the app accessible users, connect it to a Facebook page.
If your page is available, select it:
If you have to create a new page, click under the placeholder
Generate the Page Access Token:
Your token has been generated, copy it:
Paste it in the Page Acces Token field on the Clustaar plateform:
On the top of your ‘Facebook for Developers’ app page, enter settings.
Go to Settings > Basic,
In front of the App ID, find the App Secret, click on “Show”:
You’ll be asked to file in your password and then the code appears:
Copy the code:
And paste it in the Clustaar Channels configuration form in the “Application secret” field:
Set up the Webhook verify token
Go back on the ‘Facebook for Developers’ page. On the webhook section, click “Setup Webhook”:
In the Clustaar app, go to the channel setting section and copy the link of your webhook:
And paste it on the first field:
Then generate a password Verify Token. Choose a password or generate it:
Copy and paste it,
- In the Clustaar app “Webhook verify token” field:
Next, click on “Activate integration”.
- On the ‘Facebook for Developers’ go to the “Verify Token” field:
Click on “Verify and save”.
Connect your app to your Facebook page
Now that your webhook has been validated, click on “Select a Page” and select your page :
And then “Suscribe” your webhook !
Go back to your Facebook page settings
On the left, select the Messenger plateform tab:
Copy the ID of your ‘Facebook for Developers’ app:
You can find it at the top of your ‘Facebook for Developers’ page in your app’s interface.
Paste it in the field “Link Your App to Your Page”:
And click “Link”:
Congratulations, your app is linked to your page !
Configure your interface
On your facebook page, click on “Add a button“:
Select “Send Message“:
Then click “Next”, and select “Messenger”:
And click “Finish”:
Move your cursor over the button and select “Test Button”:
Then start chatting with your bot:
That’s it! Now you have a bot on your Facebook page.
Note: For the moment, your chatbot will only be accessible to the people with a role in your Facebook app.
If you want to allow access to everyone, you will have to submit your app for review.