解析云代码以向用户组发送推送通知

时间:2016-07-07 11:58:17

标签: node.js parse-platform cloud-code

我希望在我的数据更改为关系用户时发送推送通知。例如,我有一个小组,它有8个成员。 因此,我需要使用云代码向这8位成员发送推送通知。我该怎么办?

由于

1 个答案:

答案 0 :(得分:1)

因此,在输入其他人时,请回答此链接Cloud Code Push Notification Query to Array of PFUsers

因此,假设您更新或向其中一个类添加新行,该类将具有用户对象ID的数组,然后在云代码中,您将按照上面列出的示例链接进行操作。

可能会帮助你。

您还可以查看channels for the Installation Class

您可以从客户端向此频道和8位用户发送推送。

订阅频道巨人

的用户的小代码示例
// Send a notification to all devices subscribed to the "Giants" channel.
PFPush *push = [[PFPush alloc] init];
[push setChannel:@"Giants"];
[push setMessage:@"The Giants just scored!"];
[push sendPushInBackground];

这个例子再次出现在上面的链接中,所以你可能会走那条路。

相关问题