我的应用程序是用 NativeScript 开发的。对于 FCM,我使用 nativescript-plugin-firebase
。
每当我从 FCM 控制台尝试时,我都会收到推送通知。但是,当我尝试从 postman 那里收到推送通知时,我从未收到过推送通知,如下所示。
URL : POST : https://fcm.googleapis.com/fcm/send
Headers : Authorization = key="******", Content-Type=application/json
数据:
{
"data": {
"title": "RAJA RAJA",
"message": "another test",
"name": "Muthukumar ME"
},
"to" : "**************************************"
}
回应:
{
"multicast_id": 5806593945960213086,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:1521623661699559%161a06bff9fd7ecd"
}
]
}
任何人都知道我错过了什么,当我尝试使用 postman 时,即使我得到了成功响应,推送通知也没有出现。
最佳答案
{
"to" : "********",
"priority": "high",
"notification": {
"title": "Title",
"body" : "First Notification",
"text": "Text"
}
}
关于firebase - FCM - 推送通知仅适用于控制台,不适用于 postman ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49402513/