【问题标题】:How to have the Facebook Messenger Chatbot Ignore Inbox Conversations with a FB User?如何让 Facebook Messenger 聊天机器人忽略与 FB 用户的收件箱对话?
【发布时间】:2020-01-06 20:12:51
【问题描述】:

我们的聊天机器人会监听我们 Facebook 页面上发生的所有事件。

当主页管理员通过收件箱与 Facebook 用户交流时,我们的聊天机器人也会回复。

我们已经通过 messenger api webhook 审查了 message_echo "https://developers.facebook.com/docs/messenger-platform/reference/webhook-events/message-echoes/?locale=ar_AR" 事件,并能够确定是“应用”发送了文本还是由页面管理员发送的

{
        "sender":{
          "id":"<PSID>"
        },
        "recipient":{
          "id":"<USER_ID>"
        },
        "timestamp":1457764197627,
        "message":{
          "is_echo":true,
          "app_id":1517776481860111, // if that key doesn't exist so human sent it
          "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>",
          "mid":"mid.1457764197618:41d102a3e1ae206a38",
          ....
}   

我们希望 Messenger 聊天机器人忽略 Facebook 管理员和 facebook 用户之间的对话。

我们怎样才能做到这一点?

【问题讨论】:

    标签: facebook facebook-graph-api facebook-messenger


    【解决方案1】:

    移交协议的存在是为了将控制权传递给多个机器人应用程序之间的对话 - 或传递给页面收件箱。

    https://developers.facebook.com/docs/messenger-platform/handover-protocol/pass-thread-control#page_inbox

    页面管理员也可以请求线程控制,https://developers.facebook.com/docs/messenger-platform/handover-protocol/request-thread-control#page_inbox

    【讨论】:

      猜你喜欢
      • 2016-08-14
      • 1970-01-01
      • 1970-01-01
      • 2019-01-03
      • 2020-03-28
      • 1970-01-01
      • 1970-01-01
      • 2017-08-21
      • 1970-01-01
      相关资源
      最近更新 更多