-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
I am now on the new parse open source server and I am trying to send a push notification using the cloud main.js. I have sent a push using curl but am having a problem with javascript. Here is the code I have.
Parse.Cloud.define("PushNotification", function(request, response) {
console.log('sending push');
var Installation = new Parse.Query(Parse.Installation);
console.log(Installation);
Parse.Push.send({
where: Installation,
data: {
alert: request.params.Message,
badge: 0,
sound: 'default'
}
}, {
useMasterKey: true,
success: function() {
// Push sent!
console.log('Push sent');
response.success('success');
},
error: function(error) {
// There was a problem :(
response.error("Error push did not send");
console.log('sending push error: '+error);
}
});
It says that it sent but It did not. If any one could help that would be great!
Twizzlerfw
Metadata
Metadata
Assignees
Labels
No labels