Merhaba arkadaşlar Firebase API kullanarak PHP-Postman üzerinden bildirim göndermek istiyorum ancak işe yaramıyor, bildirim gitmiş gibi gözüküyor mesaj id veriyor ancak bildirim kullanıcılara ulaşmıyor kullandığım PHP kodları ve dönen sonuç aşağıdadır Postman üzerinde de aynı sonuç var, gidiyor gibi gözüküyor ama gitmiyor. Bu konuda tecrübeli olan arkadaşlar PM üzerinden dönüş yapabilir mi
PHP Kodları:
define('API_ACCESS_KEY','xxxxxxxxxxxxxxxxxxxxxxx');
$fcmUrl = 'https://fcm.googleapis.com/fcm/send';
$notification = [
'title' =>'xxxxxxxxxxxxxxxx',
'body' => 'yyyyyyyyyyyyyyy.'
];
$extraNotificationData = ["message" => $notification,"moredata" =>'dd'];
$fcmNotification = [
"content-available"=>"1",
'to' => "/topics/All", //single token
'notification' => $notification,
'data' => $extraNotificationData
];
$headers = [
'Authorization: key=' . API_ACCESS_KEY,
'Content-Type: application/json'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$fcmUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fcmNotification));
$result = curl_exec($ch);
curl_close($ch);
echo $result;Bunu çalıştırınca şu sonucu döndürüyor:
{"message_id":4709853598141.......}Yani bildirim gidiyor gibi gözüküyor ancak gitmiyor.