-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No device token provided on Firebase.sendTopic #25
Comments
This is a bug and I jus fix this issue and update to v 2.1.2. |
Thanks |
Is it updated? Can I re-download the library? |
Yes, you need to delete the old one and download new zip file from this GitHub. Arduino library manager was not the latest version. |
Ok |
It worked! |
Hi Mobizt. I am using Firebase ESP8266 Client Version 2.8.5. but I am still getting this "No device token provided" message. Which version should I use to get rid of this error? Thanks. |
@afung2468 See the fcm example |
Thanks for the reply. I used the wrong function to send the topic. Your example does not show how to send a topic. After some experiments, it works now. Thank you.
|
You need to read the doc rather than ask for everything https://github.com/mobizt/Firebase-ESP8266/tree/master/src#firebase-cloud-messaging-object-functions https://github.com/mobizt/Firebase-ESP8266#firebase-cloud-messaging-fcm |
Hi,
I am trying to use cloud messaging in esp8266 to give notification to android phone
My android phone has subscribed to the topic "general"
As a test I am sending the message in the void setup method
My esp8266 code :
`
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Firebase.reconnectWiFi(true);
firebaseData.fcm.begin("SECRET_KEY_IS_COPIED");
firebaseData.fcm.setPriority("high");
firebaseData.fcm.setTimeToLive(60);
firebaseData.fcm.setNotifyMessage("Notification", "Hello World!", "firebase-logo.png",
"http://www.google.com");
firebaseData.fcm.setTopic("general");
if (Firebase.sendTopic(firebaseData))
{
//Success, print the result returned from server
Serial.println(firebaseData.fcm.getSendResult());
}
else
{
//Failed, print the error reason
Serial.println(firebaseData.errorReason());
}
`
And Error log:
`
No device token provided
`
Why do I need to give device token for topics?
The text was updated successfully, but these errors were encountered: