IBM Watson和Facebook Messenger聊天机器人

时间:2020-06-29 17:52:16

标签: facebook chatbot ibm-watson facebook-messenger

我正在使用IBM Watson Studio构建聊天机器人,我将助手与Facebook Messenger集成在一起没有任何问题。但是我无法将任何JSON模板从IBM Watson中的对话框节点发送到Messenger,即Messenger仅显示通用消息。我在IBM Watson对话框节点中使用以下JSON,Messenger显示正常,但不显示按钮模板。如何解决此问题? 请告诉我。

'''

 {
  "output": {
    "generic": [
      {
        "values": [
          {
            "text": "ok"
          }
        ],
        "response_type": "text",
        "selection_policy": "sequential"
      }
    ],
     "facebook": {
        "message": {
          "attachment": {
            "type": "template",
            "payload": {
              "text": "Hi,\n\nWe have a great giveaway for you, but first we’d like for you to follow us so that you can stay updated on the latest news and trends.\n\nPlease take a moment to follow us and let me know when you've followed us by typing DONE:\n\n",
              "buttons": [
                {
                  "url": "https://www.facebook.com/ibmcommerce/",
                  "type": "web_url",
                  "title": "Follow IBM Commerce",
                  "messenger_extensions": "false",
                  "webview_height_ratio": "full"
                }
              ],
              "template_type": "generic"
            }
          }
        }
      }
  }
}

'''

0 个答案:

没有答案