facebook - How do I get the current User Id with GoViral ANE -


i using goviral ane integrating facebook, creating leaderboard display in game.

i highlight current user's score, don't appear have access id returned via app_id/scores request.

for example, data returned in following format:

{"score":123,"user":{"name":"colin","id":"1234"}} 

the id portion looking match current user highlight score.

i have tried goviral.goviral.getfbaccesstoken() wrong thing. have tried making call out current user's score, requires user id make call, little stumped on one.

searching on google doesn't seem return useful results either.

thank time.

ah, seems don't need user id make call after all.

the call attempting following:

from facebook developer site:

you can read score person playing game issuing http request /user_id/scores user access_token.

with code:

goviral.goviral.facebookgraphrequest(   goviral.goviral.getfbaccesstoken() + "/scores",   gvhttpmethod.get); 

however following call works:

goviral.goviral.facebookgraphrequest(   "me/scores",   gvhttpmethod.get); 

so using "me" works instead of user id, returns:

{"score":123,"user":{"name":"colin","id":"1234"}} 

allowing me access user id.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -