【发布时间】:2015-02-20 20:18:10
【问题描述】:
我正在尝试使用以下云代码
Parse.Cloud.job("sendAlert", function(sendAlert, status) {
Parse.Push.send({
data: {
"content-available": 1,
}
}, {
success: function() {
status.success("Push Worked!!!");
},
error: function(error) {
status.error("Uh oh, something went wrong.");
}
});
});
发送silent 推送警报。
它失败并调用错误函数。有什么问题?
【问题讨论】:
-
传递给错误函数的参数可能会提供线索。
-
它显示的错误是什么?您还可以查看错误日志以获取更多信息。
-
@Fogmeister The log: E2015-02-20T20:22:29.903Z] v21: Ran job sendAlert with: Input: {} Failed with: Uh oh, something wrong.
-
是的。那是你自己的信息。你已经把那个文本放在那里了。尝试改用
status.error(error);。这就是错误的原因。 -
@Fogmeister 新日志 - pastebin.com/WNkeZj0c。谢谢。
标签: parse-platform push-notification push