logo
Development
Search
Facebook Messenger

Facebook Messenger

You can integrate the Agent service into your Facebook Messenger, allowing your Messenger users to communicate with the Agent through Messenger.

Create a Facebook Messenger APP

  1. Log in to Meta for Developers and click Create APP

image-20250224183923977

  1. Select Other, then click Next
    image-20250224184129675

  2. Choose the Business app type and click Next
    image-20250224192953672

  3. Enter the app name, click Create app, and if you have a business account, associate your account.
    image-20250224193210868

Obtain Messenger Configuration

  1. On the page, click Add Product and find Messenger, then click Set up
    image-20250224194020828

  2. Click Messenger API Settings, and on the Configure webhooks page, click Configure
    image-20250224195043260

  3. Configure the following parameters in Edit Callback URL

image-20250224195424865
4. Go to Generate access tokens and click Connect. Follow the prompts to complete verification and select the Facebook public page associated with the Messenger API to complete the public page association. If there is no public page to use, click Continue to proceed. Then go to Facebook public page to create one. After creating the page, return to re-verify and associate the public page.
image-20250224200302057

  1. After associating a page, click Add Subscriptions
    image-20250225112744753

  2. Select Messages, then click Confirm
    image-20250225113034704

  3. In Generate access tokens, click Generate
    image-20250225113343752

  4. Copy and save the generated page token and page ID, then check the "I understand" checkbox and click Done. The page token and page ID will be used later in the configuration.
    image-20250225113809131

  5. Select App settings>Basic, copy the App secret, and save the APP secret for later use in the configuration.
    image-20250225115310926

Configure in Agent

  1. Log in to GPTBots

  2. Select the target Agent/Flow-Agent and access its Integration tab. (The feature of Integration is only available to a published agent/flow-agent; If you have changed the configurations of the target agent/flow-agent, you must save and publish the current version before performing Integration.)

image-20250225121541516

  1. Select Facebook Messenger in the integration methods
    image-20250303172915699

  2. Enter the Token, Page ID, and App Secret, then click Modify
    image-20250303173302202

  3. If you want to update the welcome message, you can click Advanced Setting
    image-20250303174756409

Chat with Agent in Facebook Messenger

  1. Log in to the Facebook public page and copy the URL of this page

  2. Click the account avatar in the upper right corner of the page, then click the developer account

  3. Enter the URL of the public page in the browser and click the send message button. Then, you can communicate with your smart Agent in the pop-up Messenger window. Additionally, you can search for the public page in Messenger to start a conversation with your Agent.
    image-20250303175342986