Facebook Messenger Bot - 通用模板默认操作不支持信使扩展

时间:2017-03-24 15:05:13

标签: facebook facebook-messenger facebook-messenger-bot

我正在向bot发送以下数据。模板正确呈现,但Messenger Extensions仅在我使用Go按钮时有效,但default_action缺少对Messenger Extensions的支持,我收到一条错误消息,指出当前版本的SDK不支持Messenger Extensions而且我应该升级,但如上所述,使用Go按钮效果很好。如何让Messenger Extensions使用默认操作?

{
  "recipient": {
    "id": *recipientId*
  },
  "message": {
    "attachment": {
      "type": "template",
      "payload": {
        "template_type": "generic",
        "elements": [
          {
            "title": "*Title*",
            "image_url": "*ImageUrl*",
            "subtitle": "*Subtitle*",
            "buttons": [
              {
                "type": "web_url",
                "url": "*TheUrl*",
                "title": "Go",
                "messenger_extensions": true,
                "fallback_url": "*TheUrl*"
              },
              {
                "type": "element_share"
              }
            ],
            "default_action": {
              "type": "web_url",
              "url": "*TheUrl*",
              "messenger_extensions": true,
              "fallback_url": "*TheUrl*"
            }
          }
        ]
      }
    }
  }
}

0 个答案:

没有答案