【发布时间】:2017-06-14 12:49:57
【问题描述】:
我是 firebase 的新手,想通过 firebase 云消息在浏览器上显示通知,但问题是我混淆了在哪里编写此代码 ::
POST /fcm/send HTTP/1.1
Host: fcm.googleapis.com
Content-Type: application/json
Authorization: key=YOUR_SERVER_KEY
{
"notification": {
"title": "New chat message!",
"body": "There is a new message in FriendlyChat",
"icon": "/images/profile_placeholder.png",
"click_action": "http://localhost:5000"
},
"to":"YOUR_DEVICE_TOKEN"
}
请告诉我必须在哪个文件中编写此代码。
任何帮助将不胜感激。
【问题讨论】:
标签: javascript firebase firebase-cloud-messaging