5
\$\begingroup\$

Think like how Bejeweled 2 does its Blitz mode where it connects to Facebook, pulls your friends names and their top scores for the week. Are there any libraries, etc. that already help facilitate this process? I would rather not re-invent the wheel if necessary.

\$\endgroup\$
3
\$\begingroup\$

Check out the Mochi Media Scores API as a general purpose leaderboard system. If you could get the list of friend IDs from Facebook you might be able to leverage it to create one.

DIY

You probably already know how to do this yourself, but if you wanted to implement it, you could do something like this...

First, create a database of scores, where each row has player's Facebook ID, score and date/time of score. Every time someone plays your game, record the score along with their Facebook ID and the current date/time.

To generate a friends scores leaderboard for someone, query Facebook for a list of the person's friends, specifically their IDs. Then query your scores database for entries matching the given IDs. Generate the leaderboard you want.

\$\endgroup\$
  • \$\begingroup\$ Does this API also applies for Java-Android programming? I really want to put a notification onto my Android game app to ask if you want to display high score or achievements. I'm currently using Eclipse IDE for Java developers and LibGDX engine. \$\endgroup\$ – David Dimalanta Jan 10 '13 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.