Leaderboards based on facebook
Asked Answered
S

2

6

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?
Spurlock answered 15/9, 2012 at 23:17 Comment(0)
F
4

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.

Footrope answered 27/11, 2012 at 0:25 Comment(0)
E
0

Here are the answers that I found while trying to do the same thing you are.

Can I use scores connection on iOS application to store whole game result? Was it possible recently or was it always possible?

No. At least for now, Facebook only accepts one score value per user of your game. You might be able to achieve muliple scores using Parse along side of Facebook. See https://parse.com/questions/i-want-to-know-if-parse-could-help-with-leaderboards-in-my-game

Is it possible to set, get and change custom object in Open Graph?

Yes. However, I think you would need to submit a new app update every time you wanted to make a change.

Do I have to create Web applications to achieve my goal?

I don't think so. You do not need a web server to use the Graph API for Scores.

Elwira answered 4/11, 2013 at 0:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.