我发送了一个访问令牌,该访问令牌对Facebook访问令牌调试器有效,但是它仍然说它不是有效的/无效的访问令牌
我尝试过通过调试器放置访问令牌:变为活动状态
var access_token = pathname.match(/\#(?:access_token)\=([\S\s]*?)\&/)[1];
$.ajax({
url: "https://graph.facebook.com/me?name?access_token=" + access_token,
type: 'GET',
success: function(response) {
console.log(response)
//Would want to do stuff with the Return data
},
error: function(response) {
$("#nameField").html("<li class='dataField' id='nameField'>The response could not locate the data source</li>")
}
});
我希望它返回JSON数据/单个JSON条目。最终显示:
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "BdmIzcoyALS"
}
}
答案 0 :(得分:0)
没关系,找到了答案:
这是我正在使用的事实:
https://graph.facebook.com/me?name?access_token=
我应该使用的时间:
https://graph.facebook.com/me?name&access_token=