简体   繁体   中英

How to send Pushnotification from Parse.com using PHP SDK?

I am using this SDK for Parse.com https://github.com/ParsePlatform/parse-php-sdk This is not working for me while sending Push notifications using

$query= ParseInstallation::query();
$query->where('deviceType', 'ios');
parsePush::send(array(
  "where" => $query,
  "data" => array(
    "alert" => "Hello Hello !"
  )
));

Getting This: Fatal error: Call to undefined method ParseInstallation::query() in

This is what I am using to send a push notification and it works perfectly. Make sure you've setup in the dashboard the ability to send push notifications from a client.

$notification = "Your notification!";
$query = ParseInstallation::query();
$query->equalTo("deviceType", "ios");

$data = array("alert" => $notification);

ParsePush::send(array(
  "where" => $query,
  "data" => $data
));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM