1

I am a bit confused when it comes to Scores and Achievements. I am currently registering Achievements 1 - 1000 assigned to points 1 - 1000, where each point is an achievement.

I know each achievement. has a point value associated to it, if i post achievement to a user does the point value increase to, or do i post the point value and the achievement auto associates, or do i post both?

ShawnDaGeek
  • 4,145
  • 1
  • 22
  • 39

1 Answers1

4

Here is the documentation about achievements.

For each achievement you create a webpage that describes the achievement using meta tags, including its title and the point value of that achievement. For example, you might create a "Fed brown cow" achievement that's worth 25 points at http://www.mygame.com/achievements/fed_three_cows.

Then, when the user achieves something, you just pass Facebook the URL to the achievement. See the "Create" section in the doc. You never directly award a user points; you award a user an achievement and they'll automatically get the points associated with that achievement. For example, if you were to award a user the achievement at the URL http://www.mygame.com/achievements/fed_three_cows that we created earlier, this would automatically award that user 25 points.

As an aside, Facebook enforces that the entire app never awards more than 1000 points total, so you probably shouldn't have a 1000 point achievement unless that's the only achievement you want to ever award.

Wayne Kao
  • 8,125
  • 5
  • 30
  • 25
  • Thank You Wayne, that clears up alot. As planned each of my achieves will be worth upto 5 points as to spread the point system over 1000 levels. Similar situation. I have been testing the game, but a friend of mine who tried my game had an error where my game loaded the Gardens of Time scores. To see this add gardens of time, play one round and then add my game. http://apps.facebook.com/AnotherGrid I print_r($scores) on the Play page so the array is visible. – ShawnDaGeek Sep 05 '11 at 16:53
  • Is there an easy way to access my apps score card for that user using php? I was under the impression that if my app requests the users scores only my app would be returned. `$user_score_fetch = $facebook->api('/'.$user_profile[id].'/scores?'.$access_token.''); $user_score = $user_score_fetch[data]; $user_curscore = $user_score[0]; $score = $user_curscore[score] + 1; $score_URL = 'https://graph.facebook.com/' . $user_profile[id] . '/scores'; $score_result = https_post($score_URL, 'score=' . $score . '&access_token=' . $app_access_token` – ShawnDaGeek Sep 05 '11 at 16:54
  • the only way i can think to do this is UID/scores and loop though the data ID 0 - 1 - 2 etc until i reach the array that meets the arguement for my app id. Even though the array is small, it could end up looping though thousands of arrays before it finds my app and that would be every single time the score is updated. – ShawnDaGeek Sep 05 '11 at 17:01