Javascript 如何在没有访问令牌的情况下获取名字和姓氏?
根据FB SDK文档,似乎响应对象I中的一些数据应该能够检索sans访问令牌。()但是,当我执行此操作时,我会在响应对象中接收消息-Javascript 如何在没有访问令牌的情况下获取名字和姓氏?,javascript,html,facebook,Javascript,Html,Facebook,根据FB SDK文档,似乎响应对象I中的一些数据应该能够检索sans访问令牌。()但是,当我执行此操作时,我会在响应对象中接收消息- An active access token must be used to query information about the current user. 有人对这件事有什么见解吗 非常感谢 编辑-我正在使用的代码: function testAPI() { console.log('Welcome! Fetching y
An active access token must be used to query information about the current user.
有人对这件事有什么见解吗
非常感谢
编辑-我正在使用的代码:
function testAPI() {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function (response) {
console.log('Good to see you, ' + response.name + '.');
console.log(response);
});
}
到目前为止,我的发现表明,基本信息不能被访问,除非你有“userid”或“username”,如本文所述 如果必须尝试使用以下url获取基本信息,则需要访问\u令牌
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500
}
}