gpt4 book ai didi

php - 如何使用 PHP SDK 从 Parse.com 发送推送通知?

转载 作者:行者123 更新时间:2023-11-28 19:00:26 25 4
gpt4 key购买 nike

我正在为 Parse.com 使用这个 SDK https://github.com/ParsePlatform/parse-php-sdk使用

发送推送通知时,这对我不起作用
$query= ParseInstallation::query();
$query->where('deviceType', 'ios');
parsePush::send(array(
"where" => $query,
"data" => array(
"alert" => "Hello Hello !"
)
));

得到这个: fatal error :在

中调用未定义的方法 ParseInstallation::query()

最佳答案

这就是我用来发送推送通知的方式,它运行良好。确保您已在仪表板中设置从客户端发送推送通知的功能。

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

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

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

关于php - 如何使用 PHP SDK 从 Parse.com 发送推送通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26458869/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com