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!

No correct solution

OTHER TIPS

I found the solution, here it is: _facebook.requestWithGraphPath("/me/scores?score=123"...

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top