[英]How to post game score in facebook using graph api in android?
I am developing an android game and i am trying to use Facebook's graph Api to create a leaderboard for my android game integrated. 我正在开发一个Android游戏,并且尝试使用Facebook的图形Api为集成的Android游戏创建排行榜。 how can is post my score in game to facebook ? 如何将我在游戏中的得分发布到Facebook?
here, i'm trying to call following facebook graph url. 在这里,我正在尝试调用以下Facebook图形网址。
https://graph.facebook.com/10000557xxxxxxx/scores?score=2200&access_token=CAAGmYpJsHQYBACuYb5zEgF1kyKU9nwHFJNkn7ZBZCbZCmGogNR3Ls5SuQ0xECYDUZAcFVZAL5awcCruvpx1NhgYPeqmP84e4ribBFmmthDYwl6jbCbwX51dpg5eZAEurIBxxxxTAmMmC6q2kKhx7A9p8EZBHJS407IQ6BKT3tGnNZBoHByr2uJoH78ZBWbZAYmLMh8RMUmzEdl9UDfxxxxxxxx https://graph.facebook.com/10000557xxxxxxx/scores?score=2200&access_token=CAAGmYpJsHQYBACuYb5zEgF1kyKU9nwHFJNkn7ZBZCbZCmGogNR3Ls5SuQ0xECYDUZAcFVZAL5awcCruvpx1NhgYPeqmP84e4ribBFmmthDYwl6jbCbwX51dpg5eZAEurIBxxxxTAmMmC6q2kKhx7A9p8EZBHJS407IQ6BKT3tGnNZBoHByr2uJoH78ZBWbZAYmLMh8RMUmzEdl9UDfxxxxxxxx
but i have getting following response, but it contains my old score every time. 但是我得到了以下回应,但是每次都包含我的旧分数。
{ {
"data": [
{
"user": {
"id": "1000055754xxxxxxx",
"name": "Sumit Paxxxxxxxxx"
},
"score": 2029,
"application": {
"name": "Cute",
"namespace": "cute",
"id": "4644172702xxxxxx"
}
}
]
} }
You need to do a POST request instead of a GET one. 您需要执行POST请求而不是GET请求。 See: 看到:
Sample: 样品:
POST /me/scores
with the following body: 具有以下主体:
score=2200
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.