Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leaderboards based on facebook

I am working on developing a game on iOS platform, integrated with Facebook.

I searched google and found a lot of different, confusing and outdated tutorials. That's why I decided to ask here.

I would like to show player actual ranks and player results compared to friends scores. I need to keep scores for whole game and for each level separately.

I got familiar with scores connection and Open Graph Objects, however I didn't try to implement anything yet. Before I start I would like to be sure what is the best solution, and what will it take to do that. My app is going to be iOS only and I would like to avoid creating Web application.

  • Can I use scores connection on iOS application to store whole game result? Was it possible recently or was it always possible?
  • Is Open Graph Object a good solution to store player best result for each level?
  • Is it possible to set, get and change custom object in Open Graph?
  • Can I define Graph Object in simple page located on server without Facebook app configuration?
  • Do I have to create Web applications to achieve my goal?
  • Is it better to get list of friends from facebook and store points on my own serwer?
like image 624
user1674978 Avatar asked Sep 15 '12 23:09

user1674978


1 Answers

The Scores API IS available on mobile as well as desktop, just like virtually every part of the Graph API.

You CAN use the Facebook Scores API to manage the "overall app score" for your app (but not for the scores of individual levels - the user can only have one score at a time in your app). See this documentation: http://developers.facebook.com/docs/guides/games/getting-started/#step4

You could potentially use CUSTOM open graph actions to say when a user achieves a certain score in each LEVEL.

IF you are going to use a CUSTOM open graph action or object, you need to go to the Facebook Developer settings for your app and edit the Open Graph Settings to define (http://developers.facebook.com) the object, action, and aggregation you are going to use. After that, you create the many instances of your object (i.e. if your object was Level, you would create a set of levels) on your own server with simple pages tagged with Open Graph meta tags that conform to the "Level" structure you defined on Facebook. You don't need to do any of this if all you're doing is using Facebook's Scores API to track a single score per user (i.e. the overall app score).

The Scores API is available for canvas applications and mobile.

Storing the Scores on your own server is useful for many reasons, including:

  • Not requiring users to log in with FB
  • Optimization, if you can load scores faster without calling Facebook each time
  • Security, if you're worried about a client-side API call that the user can spoof
  • Having many leaderboards/scores, such as a leaderboard for each level, or tracking historical scores.

However, for a basic implementation of your overall app score, you can definitely get started just by letting Facebook store and track the information, and your app making all the calls on the client side.

like image 165
Vin St. John Avatar answered Oct 13 '22 11:10

Vin St. John