Messenger Platform Technical FAQ

分类目录: Messenger飞书信

Messenger Platform Technical FAQ


Why am I not receiving a callback to my webhook?

There are 2 steps to receiving callbacks. First, make sure your webhook is setup properly ( There is an indicator when webhooks are properly setup.

Second, you must subscribe to each page. All pages that are subscribed to will be listed.

If calls to your webhook fail for an extended period of time, your app will be unsubscribed and you will have to re-add your webhook and re-subscribe your page.

固定链接How do I verify that the webhook call is coming from Facebook for security reasons?

Calls to the webhook contain a field in the header named X-Hub-Signature, which can be used to validate that the call came from Facebook.

固定链接Why do I keep on getting developer alerts that my webhook has not been accepting updates, or keep getting the same webhook calls repeatedly?

Make sure your webhook is responding with a status code of 200. This communicates to us that the webhook was successfully received. If you do not return a 200, we will retry the call until successfully completed. Also, if a webhook doesn't return a 200 for an extended period of time, we will surface developer alerts.

Also, note that a successful status code is returned in a timely manner. A webhook call with timeout after 20 seconds. Be sure to architecture your code such that webhooks are processed asynchronously so that a successful status code can be returned immediately and processed separately.


Entry points

How do I link a plugin click or my user account to a thread?

When using the “Send to Messenger” Plugin, the data-ref parameter can be used by you as a pass-through-parameter to send through any information regarding the context of the click.

People may also discover your page through search in Messenger. In these cases, you won't have a pass-through-parameter. You can use the account linking feature to associate a thread to a user account on your site.

固定链接How come I can't see the "Send to Messenger" plugin?

When an app is in development mode only admins, developers and testers of the app are able to view the plugin. After the app is reviewed and approved, you make the app available to the public in the App Review tab in the App Dashboard.


Send/Receive API

Why do I get an "Invalid ID" or "No matching user found" error when sending a message?

There are multiple reasons why this may happen:

  • You're using an ID from Facebook Login. User IDs from Facebook Login are not intended to work with the Send/Receive API. Only user IDs obtained through authentication with the Messenger Platform will work with the Messenger Platform.
  • You're using an ID with the incorrect Page Access Token. User IDs for the Messenger Platform are scoped to a page and, therefore, are page specific. If you use a valid user ID but with a page access token that's associated with a different page, the call will not work. Be sure to use the user ID and page access token associated with the same page.
  • You're sending to a phone number that hasn't been recently verified. When using the Send API with a phone number, we will only send messages if the phone number has been recently verified. Even if the phone number is shown as verified, but has not been recently verified, then the send may fail. Re-verify your phone number and wait 24 hours until trying again.

固定链接Why can't I send messages to test platform users?

Here is a workaround to use a platform test user for your messenger platform integration:

  1. From your app's Roles page, create a new test user by clicking the Add button.
  2. Toggle the Authorize Test Users for This App? option and grant permissions "manage_pages" and "page_messaging".
  3. Use the Edit Button and get an access token for this user (using v2.6). Please save this for later.
  4. Use the Edit button to login as the test user.
  5. After logging in, create a page as the test user.
  6. Use the user access token for the test user to get the page access token for this user. You can do this with the following call:[TEST_USER_ACCESS_TOKEN]


  7. Use this page access token to link your Facebook Application with your Page:[TEST_USER_PAGE_ACCESS_TOKEN]


  8. After you have followed these steps you will receive RTU updates to your Test Page and be able to message your Test User from your Test Page. In addition to the above you can replace your access token with a long-lived token if they are expiring too quickly for your tests. Please follow the documentation here:
    GET /oauth/access_token?