FAQ

This document provides answers to frequently asked questions.

General

Apps are installed from the app website using Facebook Login and granting pages_messaging permission to a particular Page. Authorized Apps will show up in Page settings inside Advanced messaging.

Yes, a single Facebook app can subscribe to multiple pages. Once it goes for app review, like the permission pages_messaging, the app can subscribe to receive webhooks on more than one page. It will be up to you to get the context of each webhook based on the payload.

Yes, more than one app can be subscribed to a page. When multiple apps handle the same conversation is best to use the Handover Protocol to handle which bot owns the thread at any given time.

General Data Protection Regulation (GDPR)

Entry Points

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.

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.

One-time Notification API

No. Unlike subscriptions where a business can send multiple messages to people on a recurring basis, the one-time notification API limits the business to a single message per user request. If the person engages with the message, the standard messaging window will reopen.

Yes. Pages interested in using the One-time Notification API need to apply for permission. Go to the Advanced Messaging section of your Page Settings and consent to the terms. A Page will be granted permission if the Page meets our criteria.

Common uses of the API include various promotional and non-promotional use cases where the User explicitly requested a follow-up. Examples include:

  • Back in stock alerts
  • Collection launches
  • Concert tickets going on sale
  • Price drop alerts
  • Train tickets available for purchase
  • CSAT surveys

Your Page is not allowed to send a notification on a topic for which the User has not agreed to receive a notification. Please see the Usage and Restrictions and Limitations sections of the One-time Notification guide for more information.

A Page can send multiple requests however, the 24-hour policy will be applied to all the requests being sent. We also have controls in place to prevent spamming users with multiple requests.

The 24 hour standard messaging window will open only if the user interacts with the opt-in message. The behavior is consistent with interactions with other elements in the Messenger experience.

Pages will need to subscribe to message_optins webhook to receive notifications about User consent.

Once a person asks to be notified, the Page will receive a token which is equivalent to a permission to send a single message to the person. The token can be used to send a message to the person outside the 24 hour window. The token can only be used once and unused tokens will expire within 1 year of creation.

Yes. However, while it is possible to send another notification request using an existing token, there is no clear benefit for the business to send these type of requests.

No. The API does not return tokens available to a Page.

Page level. Permissions for the One-time Notification API are given at the Page level.

No. The app does not need to specify any message tags when sending a message outside the 24-hour standard messaging window using this API.

Send/Receive API

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.

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 "page_messaging".
  3. Use the Edit Button and get an access token for this user (using v4.0). 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:
    https://graph.facebook.com/v4.0/me/accounts?access_token=[TEST_USER_ACCESS_TOKEN]
    (Documentation)
  7. Use this page access token to link your Facebook Application with your Page:
    https://graph.facebook.com/v4.0/me/subscribed_apps?method=POST&access_token=[TEST_USER_PAGE_ACCESS_TOKEN]
            
    (Documentation)
  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?  
        grant_type=fb_exchange_token&           
        client_id={app-id}&
        client_secret={app-secret}&
        fb_exchange_token={short-lived-token} 
            

If your business tries to send an update message that falls under one of the approved use cases in message tags, we’d recommend you to still tag it using messaging_type=MESSAGE_TAG with an appropriate message tag. That way you don’t need to keep track of whether a conversation is still within under the 24-hour window in standard messaging.

Under the standard messaging policy apps can't send messages outside the 24-hour window. The message will fail to be sent. If a message tag is used the message can be sent outside the 24 hour period as long as is one of the supported use cases and the app is in good standing.

No, the Messenger Platform does not offer an API that returns a list of PSIDs for all the people that have opted in to receive messages from your bot.

Webhooks

There are 2 steps to receiving callbacks. First, make sure your webhook is setup properly (https://developers.facebook.com/docs/messenger-platform/webhook-reference#setup). 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.

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.

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.

There is a tool that shows recent webhook errors. If webhooks are failing to be delivered, Meta servers will unsubscribe your URL. To find the tool, go into your App dashboard > Messenger > Settings, inside the Webhooks card there is a button called Show recent errors

See Also