我有以下代码来更新用户的分数:
FB.api("USERID>/scores", 'POST', {score: currentScore, access_token: "APP_ACCESS_TOKEN"},
function(response){
if (!response || response.error)
{console.error(response);}
else { console.log(response);}
}
);
在我以前的应用程序中,相同的代码工作正常。但这一次,即使我的回复率为真,那么它也不是更新得分。我也试过通过直接链接发布分数(如下所示)进行交叉检查,以防我的代码出现问题。
https://graph.facebook.com/USER_ID/scores?score=USER_SCORE&access_token=APP_ACCESS_TOKEN
我得到的结果如下:
{
"data": [
{
"user": {
"name": "Harsh",
"id": "xxxxx"
},
"score": 0,
"application": {
"name": "xxxxxxxx",
"canvas_name": "xxxxxxxxx",
"namespace": "xxxxxxxxxx",
"id": "xxxxxxxxxx"
}
}
]
}
据我所知,这是阅读得分的结果。有人可以在我错的地方帮助我。
供参考: 1.我正在通过APP_ACCESS_TOKEN 2.我的应用程序注册为游戏 3.我正在接受publish_actions权限