Reputation: 4519
I am trying to publish scores from my app. But unfortunately I am unable to do so. I even tried using the code snippet at http://developers.facebook.com/blog/post/539/ but for some odd reason it didn't work for me. If someone can provide me with some basic guidelines I would really be helpful as that would help me build upon that system and move forward. I don't want any fancy publishing technique I am just looking forward to publishing score at the end of the game.
Using https://graph.facebook.com/user id/scores?score=10&access_token=acess_token returns
{
"data": [
]
}
Upvotes: 1
Views: 931
Reputation: 116
In the FaceBook Developer Dashboard set your app category as games. Then only you'll be able to post scores.
Upvotes: 0
Reputation: 43816
Your example looks like a HTTP GET request (i.e. 'show me the scores of this user')
To update a score you either need to make a POST request, or 'fake' the POST request by adding ?method=post
to your GET call
You'll also need to use an App Access Token, the instructions for obtaining this are at: https://developers.facebook.com/docs/authentication/#applogin
Upvotes: 2
Reputation:
I've done it using javascript sdk, you can check out the source code for my game https://apps.facebook.com/tgif-game/ you should be checking out scripts/gameui.js for the calls to posting scores and getting the list of scores.
Upvotes: 0