How do I turn likes to variable with Firebase?

Get help using Construct 2

Post » Tue Nov 08, 2016 9:54 pm

Hi, i need to turn the likes from a post on facebook to a variable in a game.
I think this is possible sending the data likes from facebook to a server like firebase and the server to the game.

I found this instruction from facebook:
https://developers.facebook.com/docs/graph-api/reference/v2.8/object/likes

But i dont know what to do with this codes.
B
13
S
1
Posts: 2
Reputation: 529

Post » Wed Nov 09, 2016 5:33 pm

Can you post the text that it replies with?

From the API page, it looks like it is a JSON object whose "total_count" field is the one you are interested in.

You should be able to use @Yann 's JSON plugin or @rexrainbow 's Hash plugin to parse the JSON and access the value you want.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 61 guests