Subscribe to themes in FCM for Chrome

I am working on sending push notifications with FCM.

I can successfully send notifications to a set of devices when I know their identifiers.

But now I want to send notifications to the topic mentioned here: https://firebase.google.com/docs/cloud-messaging/topic-messaging

They well documented the server side. But I'm not sure how to subscribe to a topic on the client side ( My client includes a chrome package application, web browsers, a mobile application based on ionic applications for different platforms. )

So, in short, how to get users to subscribe to topics?

Please help me. Thanks in advance.

PS: I went through How to register for GCM themes from javascript (for Chrome) and How to implement Google Cloud Messaging - messaging in Chrome? but it didn’t help much.

+1
source share
1 answer

Update : announced recently (October 17, 2016), Firebase JavaScript library :

- Firebase Cloud Messaging (FCM) JavaScript. , , , .

-

JavaScript FCM - , . Android, iOS Web, . , API- .

Firebase JavaScript.


. , " Chrome" - GCM FCM.

+4

Source: https://habr.com/ru/post/1627483/


All Articles