Firebase在单个请求中发送多个通知消息

时间:2018-08-15 20:14:44

标签: firebase push-notification notifications firebase-cloud-messaging

我必须使用Firebase Messaging发送单个请求的多个通知。以下是我如何向单用户发送通知的示例。任何帮助将不胜感激。

  curl --header "Authorization: key=***********" --header "Content-Type: application/json" -d '{
  "notification": {
    "title": "FCM Message",
    "body": "This is an FCM Message"
   },
  "to": "********************************************",
   }' https://fcm.googleapis.com/fcm/send

1 个答案:

答案 0 :(得分:1)

我希望它将对某人有所帮助。

curl --header "Authorization: key=***********" --header "Content-Type: 
application/json" -d '{
 "notification": {
   "title": "FCM Message",
   "body": "This is an FCM Message"
 },
 "registration_ids": ["********************************************",
    "*********************************",
    "*********************************"]
 }' https://fcm.googleapis.com/fcm/send
相关问题