Skip to content

Instantly share code, notes, and snippets.

@nidhi-canopas
Last active October 19, 2022 06:23
Show Gist options
  • Select an option

  • Save nidhi-canopas/15a721ca40c8c8449263c0727db8b8c9 to your computer and use it in GitHub Desktop.

Select an option

Save nidhi-canopas/15a721ca40c8c8449263c0727db8b8c9 to your computer and use it in GitHub Desktop.
response, err := fcmClient.SendMulticast(context.Background(), &messaging.MulticastMessage{
Notification: &messaging.Notification{
Title: "Congratulations!!",
Body: "You have just implemented push notification",
},
Tokens: deviceTokens, // it's an array of device tokens
})
if err != nil {
return err
}
log.Debug("Response success count : ", response.SuccessCount)
log.Debug("Response failure count : ", response.FailureCount)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment