Reputation: 61
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.
Upvotes: 6
Views: 5116
Reputation: 388
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.
Upvotes: 0
Reputation: 472
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:
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.
Upvotes: 4