smartnav / fcm-notification

Push notificaton for ios and android
24 stars 13 forks source link

Can we send tokens array in the fcm.send() to send notifications to multiple devices #1

Closed LakshmiKalyani93 closed 6 years ago

smartnav commented 6 years ago

Hi @LakshmiKalyani93

You can use Send to topic for this.

FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. But before this we need to subscribe to topic.

You can check this: https://github.com/smartnav/fcm-notification#subscribe-to-topic

If you still have a confusion please let me know, I can make a function for you also.

Thanks.

LakshmiKalyani93 commented 6 years ago

Hi Naveen,

Yes, can you please write me a function on that!

var FCM = new fcm('path/to/privatekey.json');

could you please tell me is it private key json we need use while preparing or any server key required for that?

Thanks, Kalyani

On Fri, Aug 3, 2018 at 10:41 AM, Navish Kumar notifications@github.com wrote:

Closed #1 https://github.com/smartnav/fcm-notification/issues/1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/smartnav/fcm-notification/issues/1#event-1769167185, or mute the thread https://github.com/notifications/unsubscribe-auth/AIOirEPs07AnKsZ7hE7I5y_v7RoIaef9ks5uM9txgaJpZM4UIamC .

smartnav commented 6 years ago

Hi @LakshmiKalyani93 Sorry for late reply.

I have added the send to multiple token function. You can check from this link: https://github.com/smartnav/fcm-notification#send-to-multiple-tokens

Only privatekey.json required from server end to send push notification. (Screen attached)

Thanks