问题描述
我正在使用以下 php sdk 来生成推杆光束推送通知。但是sdk 文档中没有提供有关如何发送数据/有效负载的信息。通知已正确发送,但我无法发送数据:请指导我如何发送数据:它在梁控制台中将 hasData 显示为 false,请检查:
我正在使用的 php sdk:https://github.com/pusher/push-notifications-php
我的代码如下:
$pushNotification = new PushNotifications([
'instanceId' => env('BEAM_INSTANCE_ID'),'secretKey' => env('BEAM_PRIMARY_KEY')
]);
$pushNotification->publishToInterests(
['message-notification'],[
"apns" => [
"aps" => [
"alert" => "Message Received",],"fcm" => [
"notification" => [
'title' => 'some title','body' => 'some body','data' => 'some data',//passing data here but not working
],]
);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)