I’m working on a Facebook game where scores get saved using the Scores API, while this all works fine, our client wants to be able to filter the highscores by country, I’m wondering if there’s an easy way to do this.
When returning the scores, the user object only contains the ID and the name, it would be pretty stupid to get the country fo each user.
Easier way would be to get user country on application install time.
You can do this by adding user location permission to authentication dialog which appears first time
when the user visits your app.
See
user_hometownanduser_locationhere.https://developers.facebook.com/docs/reference/api/user/
Then you can easily look all the user countries from your database, and sort according to country.