Messenger

Make your bot available on Messenger

Prerequisites

To create a bot on Messenger that will be connected to your dydu bot, you will need:

  • an email address,

  • a Facebook account with this email,

  • a Facebook page linked to this Facebook account,

  • a Meta for developers account with this Facebook account,

  • a Meta app.

To create a bot on Messenger that will be connected to your dydu bot, we will follow these steps:

  1. Adding and configuring the necessary products from your “Meta for developers” portal.

  2. Creation and configuration of a Meta type integration from the “Channels” menu of the BMS dydu.

  3. Advanced access request for necessary permissions and features.

Step 1 : Add necessary products for Messenger

To make your application work under Messenger, we will add and configure the following products:

  • Facebook login for business,

  • Messenger.

To do this:

  1. Click on “Add a product”.

  1. Look for the product “Facebook login for Business” and click “Configure”.

  1. The “Settings” page of the “Facebook login for business” product will open and a new section “Facebook login for business” will be displayed in the left menu.

  2. Return to the products page by clicking “Add a product”.

  3. Search for “Messenger” and click on “Configure”.

  1. The “Settings” page of the “Messenger” product will open and a new “Messenger” section is displayed in the left menu.

Your products are successfully added! We will proceed to configure them. Let's start with the configuration of the Facebook Login for Business product.

Setup the Facebook Login product

  1. Click Facebook Login for Business > Settings.

  1. Activate the option “Connect with the JavaScript SDK”. This option will allow you to connect to your Facebook account from your integration on the Channels menu of dydu.

  2. Fill in the authorized domains for the Javascript SDK: fill in the field with the main URL of your “Channels” menu.

For example, connecting to the Channels menu of the BMS dydu if the full Url is “https://sso.channels.dydu.ai/?ticket=ST-1475-7riKAzdDpiYrbRGbmhLImJ-cDd8-cas-prod-sso#/configurations". Keep only "https://sso.channels.dydu.ai/” for the field Authorized domains for the Javascript SDK.

  1. Click the “Save Changes” button.

Setup the Messenger product

  1. Click Messenger > Settings in the left menu.

  2. On the main page, look for “Access token”.

  3. Click on the “Add or Remove pages” button: you will link your Facebook page to your Meta application.

  1. A new tab will open asking you to continue as “your account”. Click on continue as “your account”.

  1. Select the Facebook page with which you want to link your Meta application: this is the page from which your bot will be reachable!

  1. Enable the listed permissions. Click “Done”.

  2. A message confirming the association of your Facebook page with your Meta application is displayed: click on the “OK” button.

  3. Your Facebook page is now listed in the “Access Token” section!

The products necessary for the proper functioning of your application on Messenger are configured!

Let's go to the next step: creation and configuration of a Meta-type integration from the "Channels" menu of the BMS dydu.

Create and configure a Meta integration from the “Channels” menu of the BMS dydu

To do this we will need:

  • the identifier of your META application and the corresponding key,

  • the identifier of the page associated with your META application and its access token.

These 3 pieces of information are specific to your Meta application and are available on your Meta for Developers portal.

Where to find the identifier of your META application and the corresponding key:

  1. In the Meta for Developers portal, on your app, click Settings > General in the left menu.

  2. Copy and keep your app ID.

  3. Click the “View” button to view your application key. You will be prompted to enter your password to view the key.

  4. Copy and keep your application key.

Where to find the page identifier associated with your META application and the corresponding token

  1. In the Meta for developers portal, on your app, click Messenger > Settings in the left menu.

  2. On the main page, look for “Access token”.

  3. Copy and keep the page ID (it is displayed under your page name).

  4. Click the “Generate token” button on your page.

  5. A modal opens, check the “I understand” box.

  6. The token is displayed in clear, you must then copy it and keep it.

With this information, connect to your BMS Dydu and open the “Channels” menu of your bot.

  1. Click “Create” to create a new integration.

  2. Select the Meta platform.

  1. Give a name to this integration and click on “Create”.

  2. You arrive on the “Information” page allowing you to choose the language and the space that will be queried for your bot on Messenger.

  3. Click the “Next” button.

  4. A modal opens: enter the identifier of your application as well as the secret key of the Meta application.

This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the app id and secret key? It is explained here!

  1. Once the information has been provided, click on “Save”.

  2. You arrive on the “Connection” page, the second and last step in configuring your Meta integration.

  3. On the left, you find the available connections. Click Create next to Messenger, to connect your dydu bot to your Messenger page.

  1. A new tab will open asking you to continue as “your account”. Click on continue as “your account”.

  1. Select the Facebook page to which you want to connect your dydu bot: this is the page from which your bot will be reachable!

  1. Enable the listed permissions and click “Done”.

  2. A message confirming the association of your Facebook page with your Meta application is displayed: click on the “OK” button.

  3. You are then redirected to the configuration of your integration from the Channels menu. A “Page” modal is opened.

  4. Enter the page ID and the token.

This information was previously retrieved from your Meta for Developers portal. You skipped this step and don't know how to retrieve the page ID and access token. It is explained here!

  1. Click on “Update”.

  2. Your messenger connection is listed!

  3. Click “Finish”.

Your bot is now available on Messenger. You can test it by going to your page and clicking on the “Message” button

Ask it your questions!

Your bot is functional but is only accessible for Meta application administrators or users added as testers.

To make it available to all Messenger users you must request advanced access to certain permissions and features and pass control of the application.

Advanced access request for necessary permissions and features

  1. Go to your Meta for Developers portal

  2. Click App Control > Permissions & Features in the left menu

  1. All permissions and features are listed on this page. Request advanced access for the following permissions:

  • public_profile

  • pages_show_list

  • pages_messaging

  • pages_manage_Metadata

A search bar is available on this page. You can use it to search for permissions to add. For each permission click on “Get Advanced Access”

Some permissions require a successful test call to Meta APIS and pass the application control put in place by Meta. We encourage you to follow the instructions and documentation provided by Meta to do so.

Once these permissions are granted, you can switch your application to “Live” mode.

Last updated

Tous droits réservés @ 2023 dydu.