Actually we are done with sending push notification from mobile to mobile & parse to mobile using parse quires. Now we are trying to send push notification from web application to mobile device using Javascript.
function authentication() {
Parse.$ = jQuery;
// Initialize Parse with your Parse application javascript keys
Parse.initialize("app key",
"javascript key");
Parse.Push.send({
//where: pushQuery,
channels: [ "Demo","Done" ],
data: {
alert : "Hello word"
}}, { success: function() {
// Push was successful
alert : "Push was successful"
// debugger;
},
error: function(error) {
}}).then (function(error) {
//Marks this promise as fulfilled,
//firing any callbacks waiting on it.
});
}
Plz Guide us,we are new to javascript. we getting error like this
POST https://api.parse.com/1/push 400 (Bad Request)