【发布时间】:2014-05-28 18:32:51
【问题描述】:
我正在尝试使用parse.com 服务从云代码(后台作业)实现高级推送目标。我已将日期添加为 Installation 对象中的字段。
如果我只有一个条件,即天等于 1,我使用以下 sn-p 使其工作
var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.equalTo("day",1);
Parse.Push.send({
where: pushQuery,
data: {
"content-available" : "1",
alert : "Message day 1!",
sound : "default"
}}, {
success: function() {
// Push was successful
},
error: function(error) {
// Handle error
}}).then(function() {
// Set the job's success status
status.success("Job finished successfully.");
}, function(error) {
// Set the job's error status
status.error("Uh oh, something went wrong.");
});
参考:Push Notification Java Script guide
我的下一步是向 20 个查询(0
【问题讨论】:
标签: javascript push-notification apple-push-notifications parse-platform