beverloo / peter.sh

Source-code for http://peter.sh/.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any example with FCM?

gibigate opened this issue · comments

Any example with FCM?

What do you mean by FCM? https://tests.peter.sh/push-message-generator/ can already send messages to FCM, also using the older proprietary mechanism (select that under authentication).

@gibigate

See https://web-push-book.gauntface.com/faq/#what-is-the-deal-with-gcm-fcm-web-push-and-chrome.

TL;DR: Firebase Cloud Messaging is not a Web Push API, it's another proprietary API. It uses Firebase Cloud Messaging JavaScript SDK, different tokens, different headers, but the same https://fcm.googleapis.com/fcm/send endpoint, and can send push notifications to native Android and iOS apps, not only to web apps.

See https://github.com/firebase/quickstart-js/tree/master/messaging for the demo.