Can't get facebook friends score by using Facebook Android SDK

Hi everyone.

I am using Facebook Android SDK for creating leaderboard.

I want to get friend’s score in list friends from Facebook.But I can’t get it.

The first I use this code :

  • FB.Login(“email,publish_action,user_games_activity,friends_games_activity”);

Then : I post my score by using:

  • FB.API(“/me/scores”, Facebook.HttpMethod.POST, myCallBackPost, myScore);

Then I get friends’s score:

  • FB.API(“/app/scores?fields=score”, Facebook.HttpMethod.GET, myCallbackGẹt);

And I check as follow:

  • I have 2 account.
  • Account 1 is friend of account 2 and vice-versa.And two account authorized in my app.I login account 1
  • When i load score up.I only show score of account 1,not account 2.

Please give me an solution if you know.

Thansk.

I suggest playing around with the open graph explorer to find the issue. Can you get an access token from your second user and find the score?

I suspect the other user has not actually posted a score. For a non developer to post a score you must have publish_actions approved by facebook.