【发布时间】:2017-10-07 14:22:31
【问题描述】:
click here to check postman request
在将 GCM 迁移到 FCM 时,我在 GCM 请求正文的请求正文中使用 aps 参数,但在尝试对 FCM 进行相同操作时,它显示 InvalidParameters。
网址:https://fcm.googleapis.com/fcm/send
请求:
{
"notification": {
"title": "notification title",
"body": "message body changed 11"
},
"data": {
"mt": "re",
"offerid": "10562",
"aps":{"badge":0,"alert":"gauravtest,$20 OFF COUPON","sound":"null.caf"},
"clpnid": "xxx",
"custid": "xxx",
"eoid": "0",
"pc": "171-2802-8180",
"ed": "11/08/2017",
"ag": "",
"url": "",
"previewimage": ""
},
"to": "xxxx"
}
回复:
{
"multicast_id": 6282546760147817634,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "InvalidParameters"
}
]
}
【问题讨论】:
-
你不能发送 aps,因为限制是每个值都必须是一个字符串,aps 是一个对象现在找不到文档
标签: java android google-cloud-messaging cordova-plugin-fcm