I am using Passport-Facebook strategy for authentication. Please find the code below:
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) {
This is giving me the following error:
FacebookGraphAPIError: (#210) This call requires a Page access token.
How do I pass the page access token? Or is this related to something else?
Passport strategy for authenticating with Facebook using the OAuth 2.0 API.