I found the solution, here it is: _facebook.requestWithGraphPath("/me/scores?score=123"...
Issue with posting a score to Fb from iOS (flash, air) app
-
19-10-2022 - |
Question
The game is written on flash/as3, I'm using the Facebook ANE from freshplanet.
The call is done like that:
var data:Object = new Object();
data.score = 300;
data.access_token = _facebook.accessToken;
_facebook.requestWithGraphPath("/me/scores", data, "POST", onScoreSubmitted);
The result is:
{"error":{"code":100,"message":"(#100) The parameter score is required","type":"OAuthException"},"accessToken":"CAAGN..."}
Other requests like _facebook.requestWithGraphPath("/me"...), _facebook.requestWithGraphPath("/me/picture.type(large)"...)
works well (return the desired data.
So I'm a bit blocked with the score posting (especially with the error type). Thanks for help!
Pas de solution correcte
Autres conseils
You can read the score for people playing your game by issuing an HTTP GET request to /USER_ID/scores with a user access_token.
var data:Object = new Object();
data.score = 300;
data.access_token = _facebook.accessToken;
_facebook.requestWithGraphPath("/me/scores", data, "GET", onScoreSubmitted);
Just replace POST with GET
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow