【发布时间】:2018-09-01 04:02:19
【问题描述】:
我正在使用 Passport-Facebook 策略进行身份验证。请在下面找到代码:
new FacebookStrategy(
{
clientID: authConfig.facebookAuth.clientID,
clientSecret: authConfig.facebookAuth.clientSecret,
callbackURL: authConfig.facebookAuth.callbackURL,
profileURL: "https://graph.facebook.com/v2.10/me",
authorizationURL: "https://www.facebook.com/v2.10/dialog/oauth",
tokenURL: "https://graph.facebook.com/v2.10/oauth/access_token",
profileFields: ["email", "profile_pic", "gender"]
},
function(accessToken, refreshToken, profile, done) {
这给了我以下错误:
FacebookGraphAPIError: (#210) This call requires a Page access token.
如何传递页面访问令牌?还是这与其他事情有关?
【问题讨论】:
-
发生这种情况时,您实际尝试进行什么 API 调用?以上似乎只是配置?
-
这是他们在 Passport-Facebook 文档中所说的:
Passport strategy for authenticating with Facebook using the OAuth 2.0 API.
标签: node.js facebook-graph-api passport.js passport-facebook