Can't load data from Facebook Global Leaderboard

0 votes
asked Jun 20, 2014 in Discuss & suggest API by Hendra Permana (10 points)

1 Answer

0 votes

Thanks for writing us.

Can you please share the logs when you are calling the leaderboard API.

Also i wil recommend you that use this sample & follow the steps that have mentioned in blog.

Let me know if you need any assistance regarding this.

Thanks.

answered Jun 20, 2014 by naresh (350 points)
When i project with local friendlist leaderboard, it's fine and data loaded. But, when i try with global leaderboard, data can't load and. Here the Log :
---------------------------------------------------------------------------------
Exception Occurred : com.shephertz.app42.paas.sdk.csharp.App42BadParameterException: {"httpErrorCode":"400", "appErrorCode":"3805", "message":"Bad Request", "details":"The Facebook Access Credentials are invalid. Received Facebook error response of type GraphMethodException: Unsupported get request."}
UnityEngine.Debug:Log(Object)
GlobalLeaderBoard:OnException(Exception) (at Assets/Examples/Scripts/GlobalLeaderBoard.cs:73)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__6:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__3:MoveNext()
-----------------------------------------------------------------------------------------------
Exception Occurred : 400
UnityEngine.Debug:Log(Object)
GlobalLeaderBoard:OnException(Exception) (at Assets/Examples/Scripts/GlobalLeaderBoard.cs:74)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__6:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__3:MoveNext()
----------------------------------------------------------------------------------------------
Exception Occurred : 3805
UnityEngine.Debug:Log(Object)
GlobalLeaderBoard:OnException(Exception) (at Assets/Examples/Scripts/GlobalLeaderBoard.cs:75)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__6:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__3:MoveNext()
-----------------------------------------------------------------------------------------------
Hi Hendra,

Let me clear that this type of error is basically related to different-2 scenario like:
1. If you don't pass the fb id when you are saving the user score.
2. Check the permission under Facebook Page.

Thanks.
Ok, i think errors come from pass fb id. if you mean passing fb id is fb.init / login, i have try that and still same errors, or there's any method to passing fb id ?
Kindly find the link below where Facebook has mention that the changes his app permission as compare to version 1.0 . We are updating our sdk for the same & let you know when it will be updated.
Also you can check the change log of SDK for the upcoming feature in new release.

https://developers.facebook.com/docs/apps/changelog

Thanks.
Any updates on this? Everything is working great for me other than the global leaderboard.

Thanks!
Facebook has changed the way of finding friends for version 2.0 and above apps. So, you need to change the way of saving user information & fetching it back into app to display the leaderboard.
 
To integrate the global leaderboard, you need to save the user information in storage service along with save user score and fetch it back using GetTopNRankers method of Leaderboard service.
 
Please have a look at the below link which have the sample project of Global Leaderboard integration and let me know if it helps.
 
https://github.com/SamitaMShephertz/Facebook-OAuth-For-Unity
Thanks,
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 support@shephertz.com
...