I'm switching to Facebook Scores API for my mobile game's highscores. Like in this question, whose answer is not quite satisfying I would like to know how to seperate between:
- Scores (The player finished a game and got a score below his actual highscore)
- Highscores (The highscore of a particular player)
My current solution with Spring Social Facebook is:
MultiValueMap<String, String> data = new LinkedMultiValueMap<String, String>();
data.add("score", Integer.toString(score));
facebook.post("me", "scores", data);
The problem with this approach is:
I'm displaying a ranking for the user at the game-finished-screen by a comparison of his score to his friends scores via HTTP GET to GRAPH_API/APP_ID/scores
Imagine a user finished a game with Score 100, but his current highscore is 500. When I post this new score to the facebook API, subsequent calls for getting the score comparison return 100 as score, rather than 500, which should be his actual highscore.
How should I solve this? Posting only the highscores to Facebook means that I can't compare the actual score from the game-finished-screen to the users friends. On the other hand, posting actual scores would make it neccessary to store the highscores somewhere else than Facebook, or resign from showing the user his highscore, which does not seem to be a good solution to me.