看板 Web_Design
作者 red0whale (red whale)
標題 [問題] FCM未送推播通知到Firefox
時間 Mon Jun  4 16:47:54 2018


FCM (Firebase Cloud Messaging)可以在網頁關閉時也能發送通知

依照FCM的說明步驟
https://firebase.google.com/docs/cloud-messaging/js/client

 

我做了以下網頁先取得我瀏覽器的device token: (請開啟console來看你瀏覽器的device
 token)

https://www.yangfamily.tw/push-notification/firebase.html


在Google Chrome和Firefox都能順利取得device token:

https://i.stack.imgur.com/qWN8f.png
[圖]
 
(↑這是我的Google Chrome取得的device token)

https://i.stack.imgur.com/EQJPB.png
[圖]
 
(↑這是我的Firefox取得的device token)




接著我用curl打算去送通知給我的瀏覽器: (這裡我姑且用我的Firefox的device token)

curl -X POST -H "Authorization: key= <我的Server Key>" -H "Content-Type: appli
cation/json" -d "{\"notification\": {\"title\": \"測試標題\", \"body\": \"推播
通知內文\"}, \"to\": \"fknx03mroEw:...........2yh4wNDRPe\"}" "https://fcm.goog
leapis.com/fcm/send"

Google Chrome是成功收到推播通知了啦…
不過Firefox卻是一點動靜也沒有



請問該怎麼解決Firefox沒辦法收到推播通知的問題呢?

我記得FCM不是支援Firefox的推播通知嗎?

--
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 110.50.132.66
※ 文章代碼(AID): #1R5Fo-PO (Web_Design)
※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1528102078.A.658.html

--
(red0whale.): [問題] FCM未送推播通知到Firefox - dinos板