这几天反复调试,终于成功解决了OPPO问题。为了给以后的朋友一点方便,将成功消息字串放在这里,供对比。
1、注意target_value的替换。
2、注意auth_token的参数与message并列。
服务器代码参考另外一篇阐。
编码前的字串内容:
{"notification":{"sub_title":"1316074444","title":"131607444490","content":"131607444490"},"target_value":"CN_1c6ad68a974d4fcf921fbea1de816a62","target_type":2}
编码后(即发送的字串):
%7B%22notification%22%3A%7B%22sub_title%22%3A%221316074444%22%2C%22title%22%3A%22131607444490%22%2C%22content%22%3A%22131607444490%22%7D%2C%22target_value%22%3A%22CN_1c6ad68a974d4fcf921fbea1de816a62%22%2C%22target_type%22%3A2%7D
返回结果:
{"code":0,"data":{"messageId":"5b6143dad2d158553ef9dc3d","status":"call_success"},"message":"Success"}