このドキュメントが更新されました。
日本語への翻訳がまだ完了していません。
英語の最終更新: 7月1日
日本語の最終更新: 5月1日

FAQ

This document provides answers to frequently asked questions.

General

アプリのインストールはアプリのウェブサイトから行い、 Facebookログイン を使用して特定のページにpages_messagingアクセス許可を付与します。認証済みアプリは、[メッセージの詳細設定]内の[ページ設定]で確認できます。

パーマリンク

はい、1つのFacebookアプリが複数のページをフォローすることはできます。pages_messaging権限などのアプリレビューを通過したアプリは、複数のページのWebhookを受け取るようにフォローすることができます。ペイロードに基づいて、各Webhookから取得するコンテキストは自由に決められます。

パーマリンク

はい、複数のアプリをページにサブスクリプション登録できます。複数のアプリで同じスレッドを扱う場合に最適な方法は ハンドオーバープロトコル を使ってスレッドを所有するボットを常に管理することです。

パーマリンク

General Data Protection Regulation (GDPR)

Entry Points

「Messengerに送信」プラグインを使用する際に、data-refパラメータをパススルーパラメータとして使うと、クリックのコンテキストに関する情報を通じて送信できます。

また、利用者はMessengerの検索機能を使用してあなたのページを見つけることもできます。このような場合、パススルーパラメータは使用できません。アカウントのリンク機能を使用すると、スレッドをサイトのユーザーアカウントに関連付けることができます。

パーマリンク

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.

パーマリンク

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 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

このような場合、次のようにいくつかの原因があります。

  • FacebookログインのIDを使用している。 FacebookログインのユーザーIDを送受信APIで使用することはできません。Messengerプラットフォームの認証を通じて取得したIDのみが、Messengerプラットフォームで機能します。
  • ページアクセストークンが間違ったIDを使用している。 MessengerプラットフォームのユーザーIDはページを対象としているため、ページに固有のものです。有効なユーザーIDでも、そのページアクセストークンが別のページに関連付けられている場合は、呼び出しが機能しません。必ず同じページに関連付けられたユーザーIDとページアクセストークンを使用してください。
  • 最近認証されたものではない電話番号に送信している。 電話番号を使って送信APIを使用するときは、電話番号が最近認証されたものである場合にのみ、メッセージが送信されます。電話番号が認証済みであると表示される場合であっても、最近認証されたものでない場合は、送信が失敗することがあります。電話番号を再度認証し、24時間待ってから再度送信してください。
パーマリンク

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.

パーマリンク

いいえ、Messengerプラットフォームは、ボットからメッセージを受信することを選択したすべてのユーザーのPSIDのリストを返すAPIを提供しません。

パーマリンク

Webhooks

コールバックの受信には2つの手順が必要です。まず、webhookが正しく設定されていることを確認します(https://developers.facebook.com/docs/messenger-platform/webhook-reference#setup)。webhookが適切に設定されていることを示すインジケーターがあります。

次に、各ページをフォローします。フォロー対象のページはすべてリストに表示されます。

webhookへの呼び出しが長期間にわたって失敗する場合は、アプリのフォローが解除され、webhookやページの再フォローが必要になります。

パーマリンク

webhookへの呼び出しには、X-Hub-Signatureという名前のヘッダー内にフィールドが含まれます。このフィールドを使用すると、呼び出しがFacebookから来たものであることを検証できます。

パーマリンク

webhookからの応答のステータスコードが200になっていることを確認してください。これは、webhookが正しく受信されたことを示します。200が返されない場合は、正しく処理されるまで呼び出しが繰り返されます。また、webhookが長期間にわたって200を返さない場合は、開発者アラートが表示されます。

成功のステータスコードは時間通りに返されます。webhookの呼び出しは20秒後にタイムアウトします。成功のステータスコードがただちに返されて個別に処理されるように、このwebhookのようなコードは非同期に処理されるように設定してください。

パーマリンク

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

AltStyle によって変換されたページ (->オリジナル) /