Перейти до основного вмісту

Messenger

Integrate Messenger with your chatbot to enhance its capabilities by reaching users on one of the world's most popular social media platforms.

Prerequisites

Before integrating Messenger with your chatbot, ensure you have the following prerequisites in place:

  • Meta Developer App: Meta Developer App to manage connections between Messenger and Chatbot, including webhooks and access tokens.
  • Facebook Page Roles: Administrator or Developer roles for a Facebook Page since Facebook accounts need to be linked to a Facebook page for using the Facebook Graph API.

Setting Up Messenger Integration

1. Create a Facebook Page

If you don't have a Facebook page:

  1. Create a Facebook Page.
  2. Ensure you have an administrator or developer role to link your chatbot.

2. Create a Meta Developer App

  1. Log in to Facebook for Developers.
  2. Select My Apps and create a new app.
  3. Choose Business as the App Type.
  4. Assign a name to your app.

3. Page ID, Access Token, Webhook

  1. In Messenger settings click Add or Remove Pages.
  2. Add your Facebook page and copy the number under your page name for the Page ID.
  3. Click Generate Token and copy it for the Access Token.
  4. Webhook 4.1. Copy Webhook URL
    • Navigate to the bot setup page
    • Locate and copy the webhook URL

Webhook Setup

4.2. Configure Messenger Settings

  • Go to Messenger settings
  • Under Messenger API Setup, paste the copied webhook URL
  • For the verify token, use a random character string
порада

Make sure to save this random character string securely, as you'll need it for verification.

Webhook Configuration

4.3. Subscribe to Webhook Fields

  • In the same settings area, locate the webhook field subscription section
  • Select all fields to subscribe

Webhook Field Subscription

Submitting Your App for Meta Review

During Development Mode, your bot is accessible to admins, developers, and testers only. After approval and public release, it becomes available to the general public.

Learn more about the App Review process.

примітка

For troubleshooting, follow this documentation if your app got rejected.

Knowledge Base Setup

  • Choose a knowledge base for your chatbot.

  • If none is selected, it will default to a GPT-like model.

    Webhook Setup

Save Your Data

  • Don't forget to save all your settings after setup!