To use the Handover Protocol, the Graph API version should be set to 2.6 or greater.
Part of the handover protocol, pass thread control allows you to pass thread control from your app to another app. The app that will receive thread ownership will receive a pass_thread_control
webhook event.
To pass thread control, make a POST
request to
https://graph.facebook.com/v2.6/me/pass_thread_control?access_token=<PAGE_ACCESS_TOKEN>
curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{"id":"<PSID>"},
"target_app_id":123456789,
"metadata":"String to pass to secondary receiver app"
}' "https://graph.facebook.com/v2.6/me/pass_thread_control?access_token=<PAGE_ACCESS_TOKEN>"
{ "success":true }
Property | Type | Description |
---|---|---|
| Object |
|
| Integer | The PSID of the message recipient. |
| Integer | Required if the Primary Receiver is passing thread control. If the Secondary Receiver is passing thread control, defaults to the app ID of the Primary Receiver. The app ID to pass thread control to. To pass thread control to the Page inbox, use app ID |
| String | Optional. Metadata passed to the receiving app in the |
For error codes see this page.