-1
我在我的數據庫中上傳視頻併發送通知,但通知無法通過移動設備接收。成功發送通知但未從Firebase接收安卓通知
代碼:
$header = array(
'header' => array(
'Authorization'=>'key='.'AAAABxjSQes:APA91bHy_qL4s0BGkiGyCq57fXYtZxzWpfTzRsHZ9AnULieeP1nScb_vuAIYtXob7LEGvvrwBdue5g24iSGDTJGWUG6YcPnAqVx76EKdb5C2P3kl2mF5SrRDAvPWFv0Uqu-HmmVc4wsH',
'Content-Type'=>'application/json'
)
);
$http = new HttpSocket();
$results = $http->post('https://fcm.googleapis.com/fcm/send', '{
"to" : "cvhXVxTGLl8:APA91bG_iaWHfcka48YwkQPN1kDSIDTk1UAzc-QpHPpnhOPvKBruxnTC_Mxo49EJ3ih2pd9_kGIygs6J_cqMP2ZvoK2I9QVILZH97H8ovsCIuKtDFIr-4jKmBxZJ6E6SeuI_5T3XbfHz",
"priority" : "high",
"data": {
"message": "This is a Firebase Cloud Messaging Topic Message!",
}
}', $header);
輸出:
{"multicast_id":5769969831923920749,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1499773517218412%4e07cf6cf9fd7ecd"}]}
[context] => Array
(
)
)
先生我使用PHP – hasnain
通知接收碼是從機器人側不從PHP。 –