Adding level and facebook friend based scoreboards to your iOS game
I don’t know why more games aren’t doing this. I really feel like I am missing something…Facebook allows you to store high scores with their graph API, but these are worthless because they are not level-based!
When I made unFed unDead! I decided that I wanted to create a unique scoreboard, where a user could view how his score on a particular level ranked amongst the scores of his friends on Facebook. I ended up doing all this in a nice friendly easy to use API called the Social Scores API, which is freely available and ready for you to use in your app at http://socialscoresapi.com.
The solution was pretty simple, first a web app was needed. I built my web app on rails. This web app allows you to create an account and then create a new app and get a unique app id and secret key. These are used to communicate with the server securely. I created an http route in my app that allows you to pass in an encrypted string with your secret key, as well as the users facebook id, facebook session key, the level id and the users score. The web app can then use the facebook API to retrieve and store the users friends, store the users high score, and retrieve a listing of all the other scores that have been entered by users he is friends with! On the App side, all that is left to do is present a view controller showing the scores. Simple!
And what is even better is that I have done all the hard work for you. All you have to do is sign up, follow a few instructions to integrate the API into your existing app, and then one line of code will allow you to store your users’ high score and show them a score board listing both their friends high scores and the over all high scores.
It’s awesome! Unfortunately, no one has used this yet except for me. I assure you, it is easy to use and its pretty awesome.
Check it out at socialscoresapi.com and please also check out our new game, ‘unFed unDead’ to see the API in action.
Lead Designer of unFed unDead