【发布时间】:2018-12-26 02:24:31
【问题描述】:
我想使用 Firebase 向网络浏览器发送后台推送通知。收到推送通知,但 Chrome 不理解该通知。消息“此站点已在后台更新”,而不是显示实际的标题和正文。出现。我做错了什么?
我的 service worker 是一个空文件。
使用 Admin API 在 Cloud Function 中编写代码:
var res = await admin.messaging().send({
"notification": {
"title": "Background Message Title",
"body": "Background message body"
},
"topic":"Test"
});
【问题讨论】:
标签: javascript node.js firebase firebase-cloud-messaging