我将颚骨与我的应用程序集成在一起,一切正常。 我根据jawbone开发门户网站(https://jawbone.com/up/developer/pubsub)中提到的文档实现了pub子通知的身份验证 我遵循了jawbone开发门户中给出的pub sub json有效载荷结构 但现在我得到了不同的pub sub json有效载荷结构。所以我的pub sub不起作用。 pub子json有效负载结构是否有任何变化?
开发门户网站上提到的有效负载结构如下:
{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859",
"secret_hash":"e570b3071a0964f9e2e69d13nd9ba19535392aaa"
}]
}
我在服务器中获得的实际有效负载如下:
{
"secret_hash": "34ba79b1512cb1bxxxxxxx",
"events":[
{
"user_xid": "6HGK86qWtLJIoXXXX",
"event_xid": "akA6KuLaNsJv8XXXXX ",
"type": "move",
"action": "updation",
"timestamp": "1473145183"
}],
"notification_timestamp": "1473145183"
}
答案 0 :(得分:1)
这是documentation on the developer portal中的错误。谢谢你指出来了!
示例已更新,以反映每个通知只有一个{
"notification_timestamp": "1372787949",
"events": [
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "EJpCkyAtwoO0XTdkYyuTNw",
"type": "move",
"action": "creation" ,
"timestamp": "1372787849"
},
{
"user_xid": "RGaCBFg9CsB83FsEcMY44A",
"event_xid": "blaHyAtwoO0XTdkYyuTNw",
"type": "sleep",
"action": "updation" ,
"timestamp": "1372787859"
}
],
"secret_hash": "e570b3071a0964f9e2e69d13nd9ba19535392aaa",
}
:
hasIpAddress