请求:
curl -i -H "Content-type: application/json" -H "Authorization:key=server key" -X POST -d
'{ "to": "/topics/all","priorty": "HIGH","data": { "message": "This is a Firebase"}}'
URL:https://fcm.googleapis.com/fcm/send
来自FCM的回应:
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 Date: Tue, 02 May 2017 04:46:09 GMT Expires: Tue, 02 May 2017 04:46:09 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Alt-Svc: quic=":443"; ma=2592000; v="37,36,35" Accept-Ranges: none Vary: Accept-Encoding Transfer-Encoding: chunked
答案 0 :(得分:0)
看到FCM正确回复是个好兆头。我认为它的问题是你的'优先'字段有一个拼写错误(priorty),这就是为什么实际优先级没有设置为高。因此,您的实际通知未收到,因为它可能会延迟,丢失等等。
你能仔细检查吗?我可能会建议使用像POSTMan这样的工具而不是CURL。