从单个应用程序向多个应用程序发送解析推送通知 [英] Sending Parse push notifications to multiple applications from single application

查看:67
本文介绍了从单个应用程序向多个应用程序发送解析推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以通过 Parse.com API 仅从一个 IOS 应用程序向不同的 IOS 应用程序发送推送通知一>.我已经可以在同一个应用程序中发送推送通知,但我想从一个应用程序发送到我的不同应用程序.

I am wondering if it is possible to send push notifications to different IOS applications from only one IOS application via Parse.com API. I can already send a push notification in same application but I want to send to different applications of mine, from a single application.

推荐答案

从技术上讲,您可以使用 Cloud Code 的 REST API,使用不同的标头回调 Parse.

You can technically use the REST API from Cloud Code, calling back in to Parse with different headers.

Parse.Cloud.httpRequest({
  method: "POST",
  headers: {
    "X-Parse-Application-Id": YOUR_APP_ID,
    "X-Parse-REST-API-Key": REST_API_KEY,
    "Content-Type": "application/json"
  },
  body: {
    "data": {
      "alert": "Yo"
    }
  },
  url: "https://api.parse.com/1/push"
}).then(function() {
  console.log("Successful push");
}, function(error) {
  console.log(error);
});

取自此处的官方论坛:点击此处

这篇关于从单个应用程序向多个应用程序发送解析推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆