0
我正在尝试拨打Facebook Graph API,我正在使用节点&表示这是我第一次使用它们,当我打电话给API我得到下面的错误,我怎么能得到访问令牌或设置它,使电话通过?获取用户访问令牌facebook访问令牌节点
message: 'Invalid OAuth access token.',
type: 'OAuthException',
code: 190,
fbtrace_id: 'hgjhguoiu' }
//这是调用API我做:
FB.api('4', function (res) {
if(!res || res.error) {
console.log(!res ? 'error occurred' : res.error);
return;
}
console.log(res.id);
console.log(res.name);
});
//这是验证电话:
app.get('/auth/facebook/callback',
passport.authenticate('facebook', {
successRedirect : '/',
failureRedirect: '/login'
}));
感谢