Skip to main content

Integrate to Messenger

Prerequisites

  • A valid Meta developer account
  • A valid Facebook Page
  • Access to manage applications under your TaskingAI workspace

Step 1: Create a Meta App

  1. Log in to Meta for Developers and click on My Apps in the top menu. Then, click the Create App button.

Create App

  1. Bind a business portfolio to your app by selecting a business manager account. You can skip this step in development and testing stage, but it is required by Meta for production.

select business

  1. Under Use Cases, click Select an app type, and then choose Business to proceed.

select app type

  1. Enter an App Display Name and Contact Email. Click Create App to finish the process.

app details

Step 2: Setup Messenger Integration on Meta

  1. In your app’s dashboard, navigate to the Add Product section on the left-hand menu. Find Messenger and click Set Up.

Add Messenger Product

  1. Scroll down to Generate Access Tokens section, click Connect.
  • Follow the authentication prompts and select the Facebook Page you want to use for creating the chatbot, linking it with the Messenger API.
  • If you don't have a Facebook Page, create a new one before proceeding.
  • Once the page is created and connected, you will see it successfully linked to the app.

Connect Page

  1. Generate an access token for the page by clicking the Generate Token button. Copy the generated token and the page id on the top, save them for later use.

Generate Token

  1. In the left navigation panel, select App settings > Basic, and copy the App Secret for TaskingAI configuration later.

App Secret

Step 3: Register the integration on TaskingAI

After the previous steps, you are ready to configure your Messenger integration on TaskingAI platform.

  1. Log in to TaskingAI console, and navigate to the Applications tab under Workspace.
  2. Click on the application you want to integrate with Messenger.
  3. On the tab selection bar on the top, click on the Channels tab.
  4. Select Messenger and provide the necessary information, including Page ID, App Secret, and Access Token you obtained from previous steps.
  5. Click Activate after filling in the information.

Slack Integration

note

On the top of the configuration, a Webhook Url is displayed. You will need this URL to register a webhook on Slack in the next step.

Step 4: Configure the webhook on Meta

  1. In the Messenger > Messenger API settings on the left-hand menu, go to Configure webhooks section and click Configure.

Configure Webhooks

  1. In the Edit Callback URL popup form, configure the following parameters and click Verify and save.
  • Callback URL: use the Webhook URL from Step3 as the callback url
  • Verify Token: Enter tkai

Edit Callback URL

  1. After associating a page, configure the subscription for the page.
    • Click the Add Subscriptions button on the connected page.
    • Tick the messages checkbox and click confirm.

Add Subscriptions

Step 5: Test the integration

Now you can send messages to the Facebook Page in Messenger, and receive responses from your TaskingAI application.

Test Messenger Integration

note

As your Meta application is in development mode, only users with the role of developer, admin, or tester can interact with the chatbot. To make the chatbot available to all users, you need to submit your app for review and approval by Meta.

To invite your other team members to test the chatbot, you can add them as testers in the app settings.

Invite Testers