我正在使用 Javascript SDK 将分数发布到 FB,但它给了我错误({error:{message:"(#15) 此方法必须使用应用程序 access_token 调用。", type:"OAuthException", code:15 }}) :
我正在使用来自以下的 accessToken:
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your
// app, and response.authResponse supplies
// the user's ID, a valid access token, a signed
// request, and the time the access token
// and signed request each expire
uid = response.authResponse.userID;
accessToken = response.authResponse.accessToken;
我用来发布分数的功能如下:
FB.api("uid/scores", 'post', {score: scoredata, access_token: accessToken },
function(response)
{
if (!response || response.error) {
console.error(response);
} else {
console.log(response);
}
});
由于 fb 特别缺少 JAvascript 的文档,任何人都可以给出想法。
雅各布