Skip to content

An API to create social, level based, scoreboards within your iOS Application

Notifications You must be signed in to change notification settings

logansease/SocialScoresApi

Repository files navigation

Thank you for checking out the Social Scores API by Logan Sease and iParty! Mobile. For more information, please view the homepage at socialscoresapi.com

Introducing the Social Scores API

The social scores api is an easy way for iOS developers to add Facebook Friend based, or "social" scoreboards into their mobile games.

Make your game a social experience!

Within your existing iOS game, after a user beats a particular level, in two lines of code the users' score gets saved and he is presented with a scoreboard showing him how his score ranks amongst all of his facebook friends and amongst the entire community.

If they want to brag about their high score, with the press of a button they will be creating a facebook post showing off the scoreboard on their timeline.

This helps make your game a more social experience and also helps promote your app!

Gain intelligence

Log into the web app to view all users' scores for each level within your game.

View the names and email addresses of your users for marketing purposes.

Getting Started - iOS Setup

Step 1- Download the iOS API Sample app

<%= link_to 'Beta version 1.0', 'files/SocialScoresExample-beta1.0.zip' %>

Step 2- Extract and open the sample app

Step 3- Copy Dependant Libraries

Drag and drop the following folders from the sample app into your project

  • Facebook
  • ASIHTTP
  • SBJSON
  • Reachability

Step 4- Copy Social Scores Files

Drag and drop the files in the SocialScores folder from the sample project.

Step 5- Link Required Frameworks

Add the following frameworks to your project

  • libSocialScores.a -- from the sample app
  • MobileCoreServices
  • CFNetwork
  • libz.dylib
  • SystemConfiguration
  • MessageUI
  • Security

Step 6- Set up Facebook App

Go to facebook.com/developers and register a new app.

In your project, open SocialScoresConfig.m and add the app ID and Secret Key for your app. Also set the link and picture URLs you'd like to use when a user makes a posting on facebook with the API.

Step 7- Set up Social Scores App

Register at socialscoresapi.com. Create a new app.

In your project, open SocialScoresConfig.m and add the app ID and secret Key for your app.

You're ready to go!

Getting Started - Use it

Show the Settings Controller

I have included a settings view controller to include in your project to allow the user to log in to facebook and to enable the Social Scores api.

You can use this by simply pushing the provided SettingsController on a button press.

After a level is completed, call the API.


    -(void) onLevelComplete{
       SocialScoresManager * scoreManager = [SocialScoresManager sharedManager];
       NSDictionary * options = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects: [NSNumber numberWithInt:score], nil] forKeys:[NSArray arrayWithObjects:@"score", nil]]; 
       [scoreManager showTopScoresForLevel:@"Level 1" inViewController:self withOptions:options];
    }

This will save the player's score, and display a leader board for this level. The player will be able to see how their score ranks amongst their friends or the whole community. They will be able to share the scoreboard on their facebook wall.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

An API to create social, level based, scoreboards within your iOS Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published