Facebook Messenger
Última actualización:2025-02-24

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. Enter the organization, select the corresponding Agent, save the version, and click Publish. After successful publishing, click Integrations image-20250225121541516

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

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

  5. 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

Share your Agent

If you have a Meta enterprise account and want to share your Agent with other Messenger users, you need to complete app review on Meta Developer. Once verified, you can share your Agent with other Messenger users.

If your developer account is not certified by Meta Enterprise, the Agent can only be used by the developer and cannot be shared with other Messenger users. Additionally, due to Meta's restrictions, the Agent cannot be used in group chats for now. image-20250303175719547