Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bit more precise doc on Push Notification Wiki #1320

Closed
lolobosse opened this issue Apr 1, 2016 · 4 comments
Closed

Add a bit more precise doc on Push Notification Wiki #1320

lolobosse opened this issue Apr 1, 2016 · 4 comments

Comments

@lolobosse
Copy link

I lost half an hour with that because I didn't know how to put this useMasterKey: true, could be cool to update the docs with the #401 response of @gfosco (here).

Something like this:

Parse.Push.send({
  where: query,
  data: {
    alert: 'Test',
    badge: 1,
    sound: 'default'
  }
}, {
  success: function() {
    console.log('##### PUSH OK');
  },
  error: function(error) {
    console.log('##### PUSH ERROR');
  },
  useMasterKey: true
});

Instead of:

Parse.Push.send({
  where: { ... },
  data: { ... }
}, { useMasterKey: true });

Putting it there would be very cool! 😄

@davimacedo
Copy link
Member

Maybe it would be also good add an example of cloud code function to send push notifications. I have been indicating the one below to the guys who ask me one:
https://gist.github.com/brunopicinin/ac38aef5665aa3208c35

@flovilmart
Copy link
Contributor

@lolobosse you should not use the old backbone style success, error callback but promises...

@lolobosse
Copy link
Author

@flovilmart I'm ready to use anything as long as it is indicated in the docs 😉

@drew-gross
Copy link
Contributor

Done! Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants