I am working on sending push notifications with FCM.
I am able to send notifications successfully to a set of devices when I know their IDs.
But now, I want to send notifications to a topic as mentioned here: https://firebase.google.com/docs/cloud-messaging/topic-messaging
They have documented the server side pretty well. But I am not sure how to subscribe to a topic on the client side (My client includes chrome packaged app, web browsers, ionic based mobile application for different platforms.)
So, in summary how do I make users subscribe to topics?
Please help me out. Thanks in advance.
PS: I did go through How to get registered into GCM topics from javascript (for Chrome) and How to implement Google Cloud Messaging - Topic Messaging in Chrome? but it did not help much.
1.4m articles
1.4m replys
5 comments
57.0k users