GetTopNRankersFromFacebook does not return friends

0 votes

Hi

I'm using App42_Unity3D_SDK_2.9

I have a problem with the method 
scoreBoardService.GetTopNRankersFromFacebook. This method returns score list which contains score for current logged user in Facebook. This list does not consist friends score.

My steps for getting friends score from Facebook:
1. Login to Facebook.
2. Authenticate user using userService.Authenticate()
3. Link user facebook account using socialService.LinkUserFacebookAccount
4. Get friends score from Facebook using scoreBoardService.GetTopNRankersFromFacebook.

Also I tested a sample app for getting friends score from Facebook from this site:
http://blogs.shephertz.com/2013/11/29/increase-engagement-with-social-leaderboards-in-unity-and-facebook-sdk/

And i had the same problem: I got score for current logged user in Facebook and did not get  friends score.

I'm using app42SDK for Unity3d and testing on android device.

asked Jul 3, 2014 in AppWarp by alexander.bargamin (16 points)
edited Jul 3, 2014 by alexander.bargamin

1 Answer

+1 vote

Hi Alexander,

In New Facebook Graph API 2.0 ,Friend list is no longer part of the default permission set and has its own permission: Asking for access to a person's friend list is now a separate permission that your app must request. The new permission is called user_friends. you must change this in our sample on line number 170 FBLeaderBoard.cs

Friend list now only returns friends who also use your app

https://github.com/AkshayMShepHertz/App42-Unity3d-Facebook-Global-LeaderBoard/blob/master/Assets/scripts/Scripts/FBLeaderBoard.cs#L170

Sorry.. our sample is also outdated and we will fix this as soon as possible.

 

Steps for getting friends score from Facebook:
1. Login to Facebook.
2. Link user facebook account using socialService.LinkUserFacebookAccount
3. Get friends score from Facebook using scoreBoardService.GetTopNRankersFromFacebook.
answered Jul 4, 2014 by sshukla480 (407 points)
Thank you. It's working. I am using

FB.Login("email,public_profile,user_friends", LoginCallback);
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...