To add the Facebook Messenger channel to your bot, you need a developer Facebook account to configure the connection between Facebook Messenger and Kore.ai. Adding the Facebook Messenger channel to your Kore.ai bot allows end-users of your bot to interact with your bot using their Facebook accounts. To add Facebook Messenger as a channel, you need to:
- Create App– Create an app on the Facebook developer portal.
- Get Page Details- Associate your Facebook page with the app and generate the Page Access Token. You need to create a Facebook page if you do not have one already.
- Setup Webhook- To enable Facebook Messenger as a channel for your bot, you must set up a webhook integration between your app and the bots platform.
- Submit for Approval- Submit the Facebook app for approval to enable the Facebook Messenger channel for your bot.
Add Email Channel
- Under the Bots section of the Bot Builder, click the bot for which you want to add the Facebook Messenger channel.
- On the Channels tab, click the Facebook Messenger icon. The Facebook Messenger page is displayed.
- In a new browser, log in to the Facebook developer portal and select the Add a New App option from the My Apps section. Enter all the relevant details for your app and click Create App ID.
- Your App is created and you are redirected to the App setup page. Select Messenger and click Set Up to continue. You are redirected to the Settings page.
- You need to 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.
- Copy the Page Access Token and enter it in the Configurations tab of the Facebook Messenger channel page.
- Locate the App ID of this page present on top of the page and enter it in the Configurations tab.
- Go to the main settings menu and select Basic settings; capture the App Secret and enter it in the Configurations tab of the channel page.
- From your Facebook account, go to the Facebook page you have selected above. From the About menu, copy Page ID and enter it in the Configurations tab of the Facebook Messenger channel page.
- Go to the Webhooks section under Settings and click Setup Webhooks to configure the Webhook between your app and the bots platform.
- Use the Callback URL and Verify Token provided in the Configurations tab of the channel page and enter them in appropriate fields in your Facebook apps configuration.
- Select messages, messaging_postbacks, messaging_optins, message_deliveries, message_reads under Subscription fields.
- Click Verify and Save.
- Under the Webhooks section, select the page you have used to generate the page token and click Subscribe.
- 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, click here.
Edit the Facebook Messenger Channel
To edit the Facebook Messenger channel, hover your mouse over the channel and click to modify. You can make necessary updates to your channel configurations and save them. You may also disable or delete the channel information by clicking the Settings icon.
Select one of the following commands to modify the channel:
- Disable/Enable – Click Disable to temporarily disable the use of the Facebook Messenger channel for your Bot. To enable the use of the Facebook Messenger channel, Click Enable.
- Delete – Click Delete, and then click OK in the Delete Confirmation dialog to permanently delete the bot channel configuration.
Warning: This action is permanent, and cannot be undone.