It is the era of Artificial Intelligence (AI), and chatbots are most commonly used. Most of the chatbots are using Natural Language Processing (NLP). So, now after building the chatbot, we need to communicate with it and what can be a better platform than social media. But the question is how? You can connect the Syra AI chatbot on social media channels like Facebook Messenger.
Here are the few steps to embed chatbot on Facebook Messenger.
- Facebook Page: – A Facebook page will be used as the identity of your bot. When people chat with your app, they will see the page name and page profile picture.
- Facebook Developer Account: – Your developer account is required to create new apps, which are the core of any Facebook integration.
- Facebook App: – The Facebook App contains the settings for your messenger bot, including access tokens.
- Webhook URL: – Actions that take place in conversation with your bot, such as new messages are sent to as events to your webhook.
- Create your account using like
- . If you have a Facebook account, you can also use it to a login to a Developer account.
To create a new app, go to your app dashboard and click on ‘Add a new App’.
Give the App Name as well email id to register your app. Here is the screenshot
- Add the messenger platform to your Facebook app.
- In the sidebar of your app settings under ‘PRODUCTS’, click ‘+ADD Product’.
- Choose Messenger and click the ‘Set Up’ button.
- After logging into Facebook for Developer account go to the Setting from the sidebar menus.
Login > Setting > Basic
- Now, copy App Id, App Secret, and change the settings as per the requirement.
- Go to Settings > Advance and set the “Allow API Access to App Settings” slider to yes.
- Publish your App to make your bot public. You can take reference from
- to make public your App
- Next, log in to your Facebook account and create a new page using the account given on Facebook for Developer. You can take reference from https://www.facebook.com/pages/create to create a new page.
- Open the Facebook Pages ‘About’ page and then copy and save the Page ID.
- Next, again go to Facebook to the developer’s account. Go to Messenger option and from there go to Access TokenMessenger > Access Token > Select a Page
From the drop-down list of Select a Page, choose your page which is created. Automatically the page access token will be generated.
- Next to Webhook, select the page from the list and add the page subscription to the webhook.
- Now to Webhook from the left sidebar, click on Edit Subscription.
- Add the callback URL as well as the Verify Token and click on Verify and Save. This step will create a messaging end between chatbot application and messenger page.
- FB_VERIFY_TOKEN and paste it in your Callback URL and verify token option. Click verify and save.
- Now, let’s go to link http://chatbots.syra.ai and create a new project there.
- Next, let’s go to the “Publish” section and click on the “Facebook” button
- From there click on the Embed to the Facebook button. Give your page access token and Page Id here and Save.
- Go back to your Messenger App and test your Bot. Your Bot is answering