Facebook Messenger configuration steps

If your chatbot is running in Facebook Messenger you will need to configure EngageOne™ Communicate Chat with the following information from your Facebook for developers page.

Note:
  • You will be copying information from Facebook for developers to EngageOne™ Communicate Chat, so it may be best to have an instance of each open side-by-side.
  • What you see on screen may not exactly match what is shown here, depending on updates made to Facebook since this help was published.

The following instructions assume that you have already registered for a Facebook and "Facebook for developers" account.

Step 1: Initial setup in Facebook

In this step, you add the Messenger Platform and configure the webhook:

  1. If you do not have one set up, create a Facebook page that corresponds to the Communicate bot.
  2. From the Facebook for developers page (https://developers.facebook.com), click My Apps > Add a New App.

    The Create a New App ID window displays.

  3. Enter the app display name, then click Create App ID. Then fill in other information as required and complete the security check.

    The App Dashboard is displayed.

  4. In the Messenger box, click Set Up.

    Facebook Messenger setup

    The Messenger Settings page is displayed.
  5. Scroll to the Token Generation section. select your page from the Page field.

    Note: If you do not have a page, click Create a new page.

    Token generation section

  6. If required, grant permissions for the page token.
  7. Copy the Page Access Token.

Step 2: Configure the bot in EngageOne™ Communicate

  1. In Designer, click Bot Settings to display the bot configuration. Open the Integration tab.
  2. Paste the page access token into the Page Access Token field.
  3. From the Facebook for Developers App Dashboard, copy the App ID (located at the top of the window) and, in Communicate, paste it into Page ID field.
  4. From the Facebook for Developers App Dashboard, go to Settings > Basic. Click Show under App Secret and copy the app secret.
  5. In Communicate, paste the app secret into the App Secret field.
  6. Type a word or phrase in the Verify Token field.

    Note: Take note of your word or phrase; you will enter the same in Facebook for developers.
  7. Click OK to save the bot configuration.
  8. Go back to the Integration tab again. The Callback URL field is now populated with a domain appended with a token string. For example:

    https://chatrunner.eu-west-2.converse.engageone.co/api/v1/sa20d32/bots/facebook/Chat Facebook Integration

  9. Copy the information in the Callback URL field.

Step 3: Configure the webhook in Facebook

  1. From the Facebook for Developers App Dashboard, go to Messenger > Settings. Scroll down to the Webhooks section.
  2. Click Setup Webhooks.

    The New Page Subscription window is displayed.

  3. Paste the Callback URL you copied from Communicate into the Callback URL field.
  4. In the Verify token field, type the word or phrase that corresponds to the token in Communicate.
  5. In the Subscription Fields section, select the appropriate options for your bot.The Messenger Platform sends events to your callback URL to notify your bot when a variety of events happen. All webhook events are optional but the relevant ones for Communicate are as follows:
    • messages
    • messaging_postbacks
    • message_deliveries
    • message_reads
    • messaging_account_linking

    For further information, see https://developers.facebook.com/docs/messenger-platform/webhook/#subscribe.

  6. Click Verify and Save.

    The Webhooks section (under Messenger settings) displays.

  7. In the Select a page to subscribe your webhook to the page events field, select your Facebook page.
  8. Click Subscribe.

    You are ready to start building your bot in EngageOne™ Communicate.

Developing the bot in EngageOne™ Communicate Chat

When developing the bot, remember that a message or question interaction that makes a call to Facebook must have used the Requires Account Linking option. This is set on the Advanced tab of the interaction.

For more information, see Creating an interaction for account linking.