Not able to get facebook friends score

+1 vote


I am trying to show facebook friends highscore using getTopNRankersFromFacebook method of ScoreBoardService. But I just get the logged in user's record.

Steps I followed:

My users are only facebook users.So I use SocialService.LinkUserFacebookAccount to link the facebook user.

SCoreBoardService.SaveUserScore to save user score. I also store facebook userid and name in the json object while saving score.

Retrieve the friends highscore using getTopNRankersFromFacebook which  doesnt retrieve the required results.

Can you please help as to what I am missing.

asked Apr 2, 2015 in App42 Cloud API-BaaS by busani_sirisha (15 points)

1 Answer

0 votes

Hello Busani,

The second parameter passed in SaveUserScore API is considered as user name for whom the score will be recorded on App42 Cloud. When you call any get API the same will come as user name from the App42 Cloud.

There is a specific API called GetTopNRankersFromFacebook to get facebook names of your friends.

Also there is one more alternative that you can do by adding display name as additional info just before you call SaveUserScore API and you can use our setQuery method just before calling GetTopNRankers API to get that additional info. You can go through our documentation to know how to save additional data along with score and how to fetch the additional data you saved with score.

Also have a look at this thread the same question has been discussed. Please have a look on it and let us know if it helps.


Himanshu Sharma

answered Apr 2, 2015 by hs00105 (2,005 points) 1 flag
Hi Himanshu,

If you have read my question completely you would have understood that , I am already following the steps that you have mentioned.

The GetTopNRankersFromFacebook method itself doesnt retrieve any results. It just gets the profile of the logged in user. The friends profiles are not being retrieved.

Let me know the solution to the problem.
Apologies for confusion.Facebook itself return the list of friends who installed your app from 2.0 and above version of apps. That's why you are unable to find all the friends in response.
Himanshu Sharma
Thanks for the reply Himanshu. But , I don't understand when you say that Facebook itself returns the list of friends. This is what the use case I'm testing.

I am using 3 different mobiles to test who are friends with each other.All the mobiles have the facebook and my app installed in them .When I try to retrieve the data using getTopNRankersFromFacebook , Only the logged in user's score is being retrieved and his friends score is not retrieved.

I also came across a similar post in the forum who are facing the same issue as I am facing
Its look like there is some confusion between both of us. If it is possible than share your sample project with us at with replicated use case and screenshots. It will help us to debug the same at our end and provide better support to you.

Himanshu Sharma
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