FacebookGraphAPIError: (# 100) Tried to access a nonexistent field (user_photos) by type node (User)

I am using pass.js for Facebook authentication, and I started getting this error recently. The full error message is as follows:

FacebookGraphAPIError: (#100) Tried accessing nonexisting field (user_photos) on node type 
(User) at D:\app\node_modules\passport-facebook\lib\strategy.js:167:21 at passBackControl 
(D:\app\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:124:9) 
at IncomingMessage.<anonymous> (D:\app\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:143:7) 
at IncomingMessage.emit (events.js:129:20) at _stream_readable.js:908:16 at 
process._tickCallback (node.js:355:11)

I tried different approaches to setting permissions. I originally announced this in

passport.use(new FacebookStrategy({
    profileFields     : ['user_photos', 'user_friends'],
}

Then I moved it to

app.get('/auth/facebook', passport.authenticate('facebook', 
{ scope : ['email, public_profile, user_photos, user_friends'] }));

And it still causes the same error as user_friends if I delete user_photos. Any ideas on what I'm doing wrong? The core of my authentication script was inspired by this tutorial https://scotch.io/tutorials/easy-node-authentication-facebook

+4
source share
2

, , . , :

  • .
  • "" " ".
  • ( 1) , .

  • " " , \

  • , .

, , ... , , - .

, , .

0

All Articles