我正尝试在我的Express应用程序中添加passport.js集成,我设法使google-passport插件正常工作,并且我对facebook-passport使用了类似的配置,但一切都在localhost上运行,但在生产环境中不起作用
当我针对“活动的” Facebook应用程序帐户运行应用程序时,出现以下错误:
{ FacebookGraphAPIError: (#100) Tried accessing nonexisting field (build) on node type (User)
at /app/node_modules/passport-facebook/lib/strategy.js:167:21
at passBackControl (/app/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:441:20)
at endReadableNT (_stream_readable.js:1098:12)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
name: 'FacebookGraphAPIError',
message:
'(#100) Tried accessing nonexisting field (build) on node type (User)',
type: 'OAuthException',
code: 100,
subcode: undefined,
traceID: 'DYUKpbx8hS9',
status: 500 }
我的代码如下:
passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "myprodurl.com"
},
loginCallback
));
关于我想念什么的任何想法吗?