如何查看我的聊天机器人接收到的原始json?

2024-09-30 06:27:11 发布

您现在位置:Python中文网/ 问答频道 /正文

{  
       "object":"page",
       "entry":[  
          {  
             "id":"255502108230287",
             "time":1502382558816,
             "messaging":[  
                {  
                   "sender":{  
                      "id":"1573650332660059"
                   },
                   "recipient":{  
                      "id":"255502108230287"
                   },
                   "timestamp":1502381982109,
                   "message":{  
                      "mid":"mid.$cAACylCZ7gBtj_jcJnVdzPHBbHOTC",
                      "seq":302583,
                      "text":"hii",
                      "nlp":{  
                         "entities":{  
                            "location":[  
                               {  
                                  "suggested":true,
                                  "confidence":0.97574394420685,
                                  "value":"hii",
                                  "type":"value"
                               }
                            ],
                            "greetings":[  
                               {  
                                  "confidence":0.71404528798453,
                                  "value":"true"
                               }
                            ]
                         }
                      }
                   }
                }
             ]
          }
       ]
    }

我正在托管Messenger的webhookHeroku.到分析文本,我需要查看webhook收到用户消息时来自Facebook服务器的原始json。上面的json是一个例如,如果我在Heroku上看不到,我也可以在本地服务器上托管webhook。有什么办法吗?这是我的webhook代码:https://github.com/EdgeGIT/DasanAssistant/blob/master/app.pyhttps://github.com/EdgeGIT/dasangeupsik/blob/master/index.js 非常感谢你。你知道吗


Tags: httpsgithubmaster服务器comidjsontrue

热门问题