【问题标题】:Facebook Messenger Bot stops workingFacebook Messenger Bot 停止工作
【发布时间】:2018-04-27 07:32:43
【问题描述】:

我有一个由 dialogflow 提供支持的 Facebook Messenger 机器人。在机器人停止工作并且无法调试问题的前一天。

我正在使用 Google 的 Dialogflow 为 fb 机器人提供动力。 在集成页面上,Facebook Messenger 服务器正在运行。

当来自 fb bot 的消息传递时,我可以看到意图被检测到并正确触发,但在 fb messenger bot 中没有得到任何响应。

那么有什么办法可以调试这个问题,比如登录fb页面什么的?

请帮忙

以下是 Webhook 端的响应。

{
    "speech": " Here are what we found for apple  laptops.",
    "messages": [
        {
            "type": 0,
            "platform": "facebook",
            "speech": " Here are what we found for apple  laptops."
        },
        {
            "payload": {
                "facebook": {
                    "attachment": {
                        "payload": {
                            "elements": [
                                {
                                    "image_url": "https://images-eu.ssl-images-amazon.com/images/I/41aVt1CW-dL._SL160_.jpg",
                                    "subtitle": "Rs. 57,430 on Amazon , Rating : 4.5",
                                    "title": "Apple MacBook Air MQD32HN/A 13.3-inch Laptop",
                                    "buttons": [
                                        {
                                            "type": "web_url",
                                            "url": "https://www.amazon.in/Apple-MacBook-Air-13-3-inch-Integrated/dp/B073Q5R6VR?SubscriptionId=AKIAJZ7ZVEW7WHEFIMWA&tag=pricee360-21&linkCode=sp1&camp=2025&creative=165953&creativeASIN=B073Q5R6VR",
                                            "title": "More Info"
                                        }
                                    ]
                                },
                                {
                                    "image_url": "https://assetscdn.paytm.com/images/catalog/product/L/LA/LAPAPPLE-MACBOOKIDA3158352E58B52/1.jpg",
                                    "subtitle": "Rs. 65,999 on Paytm Mall",
                                    "title": "Apple MacBook Air MQD42HN/A (Intel Core i5/ 8GB LPDDR3/ 256GB/ 13.3\"/ Mac OS)",
                                    "buttons": [
                                        {
                                            "type": "web_url",
                                            "url": "https://paytmmall.com/apple-macbook-air-mqd42hn-a-13-inch-laptop-core-i5-8gb-256gb-mac-os-integrated-graphics-silver-CMPLXLAPAPPLE-MACBOOIGEN198609B4C8CBF4-pdp?product_id=131486426&discoverability=online&src=grid&utm_source=NDTV&utm_medium=affiliate&utm_campaign=NDTV-recharge&utm_term=Gadget360",
                                            "title": "More Info"
                                        }
                                    ]
                                },
                                {
                                    "image_url": "https://assetscdn.paytm.com/images/catalog/product/L/LA/LAPAPPLE-MACBOOKIDA3158352E58B52/1.jpg",
                                    "subtitle": "Rs. 65,999 on Paytm Mall",
                                    "title": "Apple MacBook Air MQD42HN/A (Intel Core i5/ 8GB LPDDR3/ 256GB/ 13.3\"/ Mac OS)",
                                    "buttons": [
                                        {
                                            "type": "web_url",
                                            "url": "https://paytmmall.com/apple-macbook-air-mqd42hn-a-13-inch-laptop-core-i5-8gb-256gb-mac-os-integrated-graphics-silver-CMPLXLAPAPPLE-MACBOOIGEN198609B4C8CBF4-pdp?product_id=131486426&discoverability=online&src=grid&svc=2&utm_source=NDTV&utm_medium=affiliate&utm_campaign=NDTV-recharge&utm_term=Gadget360",
                                            "title": "More Info"
                                        }
                                    ]
                                },
                                {
                                    "image_url": "https://assetscdn.paytm.com/images/catalog/product/L/LA/LAPAPPLE-MACBOOTELE1525531013F4C5/1.jpg",
                                    "subtitle": "Rs. 65,999 on Paytm Mall",
                                    "title": "Apple MacBook Air MQD42HN/A (Intel Core i5/ 8GB LPDDR3/ 256GB/ 13.3\"/ Mac OS)",
                                    "buttons": [
                                        {
                                            "type": "web_url",
                                            "url": "https://paytmmall.com/apple-macbook-air-mqd42hn-a-13-inch-laptop-core-i5-8gb-256gb-mac-os-integrated-graphics-silver-CMPLXLAPAPPLE-MACBOOIGEN198609B4C8CBF4-pdp?product_id=143149022&discoverability=online&src=grid&utm_source=NDTV&utm_medium=affiliate&utm_campaign=NDTV-recharge&utm_term=Gadget360",
                                            "title": "More Info"
                                        }
                                    ]
                                },
                                {
                                    "image_url": "https://assetscdn.paytm.com/images/catalog/product/L/LA/LAPAPPLE-MACBOOROSE73954D5B64792/1.jpg",
                                    "subtitle": "Rs. 89,990 on Paytm Mall",
                                    "title": "Apple Macbook PRO MPXQ2/R2 Core i5 (6th Gen)/8 GB/128 GB/33.78 cm (13.3)/Mac OS)",
                                    "buttons": [
                                        {
                                            "type": "web_url",
                                            "url": "https://paytmmall.com/apple-macbook-pro-mpxq2-r2-core-i5-6th-gen-8-gb-128-gb-33-78-cm-13-3-mac-os-CMPLXLAPAPPLE-MACBOODUMM202563C836CCA-pdp?product_id=145129487&discoverability=online&src=grid&svc=2&utm_source=NDTV&utm_medium=affiliate&utm_campaign=NDTV-recharge&utm_term=Gadget360",
                                            "title": "More Info"
                                        }
                                    ]
                                }
                            ],
                            "template_type": "generic"
                        },
                        "type": "template"
                    }
                }
            },
            "platform": "facebook",
            "type": 4
        },
        {
            "type": 2,
            "platform": "facebook",
            "title": "Here are some suggestions.",
            "replies": [
                "HP laptops",
                "Lenovo laptops",
                "Dell laptops",
                "Asus laptops"
            ]
        }
    ]
}

注意:APP是开发模式,我在测试者和开发者角色中添加了id用于测试。

【问题讨论】:

  • Dialogflow v1 还是 v2?
  • 现在我正在使用 Dialogflow v1
  • 您是否尝试直接从 Dialogflow 控制台发出请求以查看您的 webhook 是否可以自己运行? “状态”字段是什么意思?
  • 在家谷歌助手工作得很好。我认为 Facebook Messenger 存在一些问题。我们如何调试?

标签: dialogflow-es facebook-messenger-bot


【解决方案1】:

请进入 DialogFlow 历史记录部分并检查对话中的“原始交互日志”数据。

我有类似的东西,对我来说(检查原始交互日志)[fulfillmentMessages 节点没有以正确的方式返回。

询问 DialogFlow 支持团队并等待他们的回答:D

【讨论】:

    【解决方案2】:

    我认为问题在于响应。请尝试一些自定义响应。我遇到过很多次这样的问题。响应对象的快速更改可能会给您结果。响应对象的动态变化有时表现不准确,可能是因为某些转义字符。

    【讨论】:

    • 这没有提供问题的答案。一旦您有足够的声誉,您就可以对任何帖子发表评论;相反,提供不需要提问者澄清的答案。
    【解决方案3】:

    访问 developers.facebook.com 并访问您的应用。 然后转到您的应用程序并转到 Messenger。 在该页面上,您会在“Webhook”部分下找到“显示最近的错误”。这可能会帮助您了解为什么您没有收到任何消息!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-17
      • 2017-05-26
      • 1970-01-01
      • 2016-11-11
      • 2017-11-10
      • 2016-11-09
      相关资源
      最近更新 更多