Set up a Facebook Channel

This topic describes how to set up a Facebook channel on Yeastar P-Series Cloud Edition, so that agents in your business can receive and reply to your Facebook Page messages.

Step 1. Create a Meta app

On 'Meta for Developers' portal, create a Meta app for the integration.

  1. Log in to 'Meta for Developers' portal, then go to My Apps from the top menu.

  2. At the top-right corner, click Create App.

  3. For Business portfolio, select your Meta business portfolio, then click Next.

  4. For Use cases, select Other, then click Next.

  5. For App type, select Business, then click Next.

  6. For App details, complete the following settings.
    Note: For Business portfolio, select your Meta business portfolio.

  7. Click Create app.

    The Meta app is created; You are redirected to the App Dashboard page.

Step 2. Set up the Meta app

On 'Meta for Developers' portal, add Messenger Platform to your Meta app and set up the app to gather the required credentials for the integration.

  1. On the Add products to your app page, click Set up on Messenger.

    You are redirected to the Messenger API configuration page.

  2. Connect the Meta app to your Facebook Page to generate an access token, and gather credentials of the Facebook Page.
    1. Scroll down to the 2. Generate access tokens section, click Connect to add your Facebook Page.

      Refresh the webpage and you will see that the Facebook Page is added.

    2. Generate an access token to authenticate the Meta app and allow it to perform actions on behalf of the Facebook Page.
      Note: Copy and note down the access token, as you will need to add it on the PBX later.

    3. Copy and note down the name and ID of your Facebook Page, as you will need to add them on the PBX later.

  3. Obtain secret key for the Meta app.
    1. On the left navigation bar, click App settings > Basic.
    2. On the right of the App secret field, click Show to show the secret key.

    3. Copy and note down the secret key, as you will need to add it on the PBX later.

Step 3. Create a Facebook channel

On PBX web portal, create and configure a Facebook channel.

  1. Log in to PBX web portal, go to Messaging > Message Channel.
  2. Click Add, and select Facebook Messenger.
  3. In the Authentication tab, enter the authentication information of Facebook.

  4. In the Messaging Settings tab, configure the channel.
    • Destination for Inbound Messaging: Specify the destination of inbound messages from Facebook Page.
      Option Description
      Extension If selected, choose an extension from the Extension drop-down list.

      Only the extension user can receive inbound messages from the Facebook Page.

      Message Queue If selected, choose a queue from the Message Queue drop-down list.

      All the agents in the selected message queue can receive inbound message(s) of new sessions in the queue. However, only the user who picks up a session will be able to receive and respond to the follow-up inbound messages in the session.

    • Close Session Automatically: Optional. If you want the system to automatically close the sessions that have been inactive for a specific period of time, select the checkbox of Close Session Automatically, then set the timeout in the Session Timeout (Days) field.
  5. Click Save.

Step 4. Set up Meta webhook

On 'Meta for Developers' portal, configure webhook for your Meta app and subscribe to the messages event, so that PBX can get notified upon receiving Facebook Page messages.

  1. On 'Meta for Developers' portal, go to the Messenger API configuration page of your Meta app.
  2. In the 1. Configure webhooks section, configure a webhook and subscribe to messages field for your app.
    1. Click Configure to add and configure a webhook.

    2. Click Manage to subscribe to messages field.

  3. In the 2. Generate access tokens section, click Add Subscriptions to subscribe to messages field for your Facebook Page.

Result

The Facebook channel is successfully set up and the channel status on PBX web portal shows , as shown below.

What to do next

  1. Optional: (Optional) Add a Tester for Meta App.
    Note: By default, the Meta app is in Development Mode and only your Meta Developer account has permission to interact with the app. As you will need to provide a Facebook account for Meta to test your app, we recommend that you add a role user to aid with the testing process.
  2. Send a message to your Facebook Page and reply to the message on Linkus. In the meantime, record a screencast of the operations.
    Note: We provide an example screencast for your reference, as shown below.