如何从passport-facebook获得更高质量的图片,我在photos[0].value中收到的图片是50x50,这是相当差的,我希望得到至少150 x150。我试图弄乱链接-没有运气。是否有可能获得更高质量的个人资料图片?
编辑:我当前的fb策略设置:
passport.use(new FacebookStrategy({
clientID: 'xxxxxx',
clientSecret: 'xxxxx',
callbackURL: 'http://localhost:4242/facebook/cb',
profileFields: ['id', 'name', 'displayName', 'photos', 'hometown', 'profileUrl'],
passReqToCallback: true
}, ...发布于 2015-04-10 08:20:58
您应该能够指定profileFields属性,如
如下所示,可以检索更大的图片:
passport.use(new FacebookStrategy({
// clientID, clientSecret and callbackURL
profileFields: ['id', 'displayName', 'picture.type(large)', ...]
},
// verify callback
...
));或者,您可以将第221行的strategy.js模块的passport-facebook文件更改为
'photos': 'picture.type(large)'看见
https://stackoverflow.com/questions/29549657
复制相似问题