<legend id='xUSRi'><style id='xUSRi'><dir id='xUSRi'><q id='xUSRi'></q></dir></style></legend>
    <tfoot id='xUSRi'></tfoot>

    <small id='xUSRi'></small><noframes id='xUSRi'>

      • <bdo id='xUSRi'></bdo><ul id='xUSRi'></ul>

    1. <i id='xUSRi'><tr id='xUSRi'><dt id='xUSRi'><q id='xUSRi'><span id='xUSRi'><b id='xUSRi'><form id='xUSRi'><ins id='xUSRi'></ins><ul id='xUSRi'></ul><sub id='xUSRi'></sub></form><legend id='xUSRi'></legend><bdo id='xUSRi'><pre id='xUSRi'><center id='xUSRi'></center></pre></bdo></b><th id='xUSRi'></th></span></q></dt></tr></i><div id='xUSRi'><tfoot id='xUSRi'></tfoot><dl id='xUSRi'><fieldset id='xUSRi'></fieldset></dl></div>

      无法使用服务器 API 发送推送通知

      Can#39;t send push notifications using the server API(无法使用服务器 API 发送推送通知)

        <tbody id='txHYx'></tbody>

      • <bdo id='txHYx'></bdo><ul id='txHYx'></ul>
          <tfoot id='txHYx'></tfoot>

          • <small id='txHYx'></small><noframes id='txHYx'>

              <legend id='txHYx'><style id='txHYx'><dir id='txHYx'><q id='txHYx'></q></dir></style></legend>
                <i id='txHYx'><tr id='txHYx'><dt id='txHYx'><q id='txHYx'><span id='txHYx'><b id='txHYx'><form id='txHYx'><ins id='txHYx'></ins><ul id='txHYx'></ul><sub id='txHYx'></sub></form><legend id='txHYx'></legend><bdo id='txHYx'><pre id='txHYx'><center id='txHYx'></center></pre></bdo></b><th id='txHYx'></th></span></q></dt></tr></i><div id='txHYx'><tfoot id='txHYx'></tfoot><dl id='txHYx'><fieldset id='txHYx'></fieldset></dl></div>
                本文介绍了无法使用服务器 API 发送推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用新的 Firebase 平台.我正在尝试获取我的应用服务器发送的推送通知并发送到我的 iPhone.

                Im using the new Firebase platform. Am trying to get a push notification sent by my app server and delivered to my iPhone.

                我的设置工作正常,我在网站上的 Firebase 通知区域手动发送消息,但是当我尝试通过 POST 将消息发送到 https://fcm.googleapis.com/fcm/send 我没有收到任何消息传送到设备.

                I have the setup working where I manually send the message with the Firebase notifications area on the website, but when I try and send the message with a POST to https://fcm.googleapis.com/fcm/send I get no message being delivered to the device.

                我正在发送以下内容(带有身份验证标头)

                I'm sending the following (with auth headers)

                { "notification": {
                    "title": "Portugal vs. Denmark",
                    "text": "5 to 1"
                  },
                  "to" : "<registration token>"
                  }
                

                我收到来自 POST 的 200 响应,正文如下:

                I'm getting a 200 response from the POST with the following body:

                    {
                  "multicast_id": 5511974093763495964,
                  "success": 1,
                  "failure": 0,
                  "canonical_ids": 0,
                  "results": [
                    {
                      "message_id": "0:1463685441784359%3ad254b53ad254b5"
                    }
                  ]
                }
                

                如果我尝试通过 Firebase 网站直接发送到此设备,它可以工作,但上面的表单帖子没有.不知道从这里去哪里!

                If I try and send to this device directly through the Firebase website it works, but the above form post doesn't. No idea where to go from here!

                推荐答案

                在 iOS 上,priority 字段似乎是强制性的.

                On iOS the priority field seems mandatory.

                {   
                  "to": "cHPpZ_s14EA:APA91bG56znW...",
                  "priority": "high",
                  "notification" : {
                    "body" : "hello!",
                    "title": "afruz",
                    "sound": "default"
                  }
                } 
                

                这篇关于无法使用服务器 API 发送推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                When does a FCM token expire?(FCM 令牌何时到期?)
                Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras(Firebase Cloud Messaging (FCM) - 当用户点击带有附加功能的通知时启动活动)
                Implement Firebase inside of a Library(在库中实现 Firebase)
                Firebase Backward compatibility with GCM(Firebase 与 GCM 的向后兼容性)
                Receiving the FCM notifications multiple times on Nougat(在 Nougat 上多次接收 FCM 通知)
                Push Notifications are delivered but didReceiveRemoteNotification is never called Swift(推送通知已交付,但 didReceiveRemoteNotification 从未被称为 Swift)

                <small id='H8bev'></small><noframes id='H8bev'>

                  <tbody id='H8bev'></tbody>

                    <bdo id='H8bev'></bdo><ul id='H8bev'></ul>
                  • <i id='H8bev'><tr id='H8bev'><dt id='H8bev'><q id='H8bev'><span id='H8bev'><b id='H8bev'><form id='H8bev'><ins id='H8bev'></ins><ul id='H8bev'></ul><sub id='H8bev'></sub></form><legend id='H8bev'></legend><bdo id='H8bev'><pre id='H8bev'><center id='H8bev'></center></pre></bdo></b><th id='H8bev'></th></span></q></dt></tr></i><div id='H8bev'><tfoot id='H8bev'></tfoot><dl id='H8bev'><fieldset id='H8bev'></fieldset></dl></div>

                      <legend id='H8bev'><style id='H8bev'><dir id='H8bev'><q id='H8bev'></q></dir></style></legend>
                    • <tfoot id='H8bev'></tfoot>