Closed madvas closed 8 years ago
ok I figured out StartCoroutine(Firebase.ToCoroutine(firebase.Push, dict1));
writes to DB
Hi, madvas.
Thanks for using my work! Hope it could helps your awesome project.
So, is it working fine now? How could I help?
Maybe you should test in your Sample scene if firebase.Child("Messages").Push("{ name: \"dikra\", message: \"awesome!\"}", true);
is making changes to your database. If not, either find the problem, or replace it with StartCoroutine(Firebase.ToCoroutine(firebase.Push, dict1));
format in your docs.
Thanks
Found your problem!
The JSON parser that I am using are unable to parse your JSON string:
firebase.Child("Messages").Push("{ name: \"dikra\", message: \"awesome!\"}", true);
They tried to parse it as an object of Dictionary<string, object>, but they couldn't detect the key as a string object because they are expecting a string to be surrounded by quote (") marks.
Of course you can make it parsable by setting the keys in the JSON as a string by yourself by surrounding them with quote (") marks, such as:
firebase.Child("Messages").Push("{ \"name\": \"dikra\", \"message\": \"awesome!\"}", true);
Is it working for you?
Edit: Ah I just realised it a moment ago, it is from the sample script isn't it? My Bad! I'll update it right away 👍
Thanks for the report madvas!
Thanks a lot, this works now ;)
Awesome!
Don't forget to review and rate 5 stars :D
Hi
First of all thanks for a great library.
I'm using this with unity. When I run your sample scene, but with URL to my firebase DB,
firebase.Child("Messages").Push("{ name: \"dikra\", message: \"awesome!\"}", true);
doesn't make any changes to database.SetValue
orGetValue
works fine.Thank you