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

Posted

技术标签:

【中文标题】Firebase 在单个请求中发送多个通知【英文标题】:Firebase messaging multiple notification in single request 【发布时间】:2018-08-15 20:14:44 【问题描述】:

我必须使用 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】:

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

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

【讨论】:

以上是关于Firebase 在单个请求中发送多个通知的主要内容,如果未能解决你的问题,请参考以下文章