【发布时间】:2019-12-04 16:47:05
【问题描述】:
我正在尝试在 Facebook Messenger 上测试 pass_thread_control 功能,以让我的 Dialogflow 机器人将正在进行的对话引导至人工操作员。到目前为止,我什至试图在 Graph API Explorer 中获得“成功”代码。我查看了 Facebook 的文档 (https://developers.facebook.com/docs/messenger-platform/reference/handover-protocol/pass-thread-control/),仔细查看了此处或其他地方的不同线程。我有:
- 订阅我的 Facebook 页面以接收messaging_handovers。
- 将 Dialogflow 聊天机器人应用设置为主要接收者。
- 将页面收件箱设置为次要收件人。
...而且我不断收到各种错误。例如,我在 Graph API explorer 中尝试这个请求:
发布到https://graph.facebook.com/v5.0/me/pass_thread_control
带参数:
{
"recipient": {
"id": "myPageID"
},
"target_app_id": "263902037430900"
}
{
"error": {
"message": "Unsupported post request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AipGijCLKQOwOl6L792ZEgG"
}
}
也许问题出在收件人 PSID 上?这是我不知道从哪里获得的唯一参数。页面范围的 app-id 是什么?我如何得到它?
或者我错过了一些权限...?
非常感谢任何帮助我摆脱困境的帮助......
【问题讨论】:
标签: json facebook facebook-graph-api facebook-webhooks