Hi for all
Erel's b4j-sendingtool-zip working great, but may be anybody know way to use CURL (already built in installed in windows 10) to send such messages?
I cannot found ready to use guide to build command line parameters for CURL yet. We must use only 4 incoming parameters: API_KEY (firebase server key for your project), topic name, title and body.
Hi all. I found this example in some old folders on my pc and decided to share here. it is a simple example of how send a firebase notification via php
Hello, For the last 2 years I am using the below function in my php to send messages successfully. Today I realized that none of my android apps receiving the messages sent via this code, messages sent directly from firebase console are receiving. the code is: function notify($r, $t, $m) {...
Main problem was because JSON part must use double quotes as special symbols like <\">, so simplest method is to use external file with ready to use JSON part
Example for sending messages by topic name "general". Launching b4j-sendingtool take about two seconds to arrive messages, CURL - about one second
curl -H "Content-type: application/json;charset=UTF-8" -H "Authorization:key=<CHANGE-TO-YOURS-FIREBASE-SERVER-KEY>" -X POST -d @jsondata.txt https://fcm.googleapis.com/fcm/send
--jsondata.txt--
{"data":{"title":"CURL test","body":"CURL sending is working!!"},"to":"\/topics\/general"}