Skip to content

Parse Push - PHP SDK #421

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

Closed
Copyrightsworld opened this issue Feb 15, 2016 · 2 comments
Closed

Parse Push - PHP SDK #421

Copyrightsworld opened this issue Feb 15, 2016 · 2 comments

Comments

@Copyrightsworld
Copy link

Hi all,

I tried to test the new "opened sourced" push functionality of the Parse Server, using a PHP app i had build when parse was hosted.

The new setup (on heroku) tried to trigger a file "ParsePush.php" which is not available as far as i can see (ERROR: 3.4251 1228744 Parse\ParseClient::_request( ) ../ParsePush.php:75).

Maybe this will be available soon on a PHP SDK update?
Am i missing something here ?

@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

I just updated the PHP SDK to version 1.2.0, you can now change the server url after initialization with

ParseClient::setServerURL('http://localhost:1337/parse');

To send push, you'll need to pass the second parameter as true to use the master key:

ParsePush::send($data, true);

If you have trouble, re-open or post a new issue. Thanks

@gfosco gfosco closed this as completed Feb 16, 2016
@Copyrightsworld
Copy link
Author

Thank you @gfosco . I did what you said and now i get no errors.

Here is the trick though. When i use the cURL code from http://blog.parse.com/announcements/parse-server-push-notifications/ to test my server, i DO receive the notification on my phone.

When i try to push via code (php), i get NO errors on my heroku logs, but no notification is delivered (this code was working when i was on Parse hosting).

Any thoughts on that?

Thnx again.

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

2 participants