来自 passport-facebook 的更高质量的照片
Better quality photo from passport-facebook
如何从 passport-facebook
获得更好质量的图片,我在 photos[0].value
收到的图片是 50x50,非常差,我希望至少得到 150x150.I 正在尝试弄乱 link - 运气不好。是否可以检索质量更好的个人资料图片?
编辑:我当前的 fb 策略设置:
passport.use(new FacebookStrategy({
clientID: 'xxxxxx',
clientSecret: 'xxxxx',
callbackURL: 'http://localhost:4242/facebook/cb',
profileFields: ['id', 'name', 'displayName', 'photos', 'hometown', 'profileUrl'],
passReqToCallback: true
}, ...
您应该能够按照
中的说明指定 profileFields
属性
点赞以获取大图:
passport.use(new FacebookStrategy({
// clientID, clientSecret and callbackURL
profileFields: ['id', 'displayName', 'picture.type(large)', ...]
},
// verify callback
...
));
或者您可以将 passport-facebook
模块的 strategy.js
文件第 221 行更改为
'photos': 'picture.type(large)'
见
如何从 passport-facebook
获得更好质量的图片,我在 photos[0].value
收到的图片是 50x50,非常差,我希望至少得到 150x150.I 正在尝试弄乱 link - 运气不好。是否可以检索质量更好的个人资料图片?
编辑:我当前的 fb 策略设置:
passport.use(new FacebookStrategy({
clientID: 'xxxxxx',
clientSecret: 'xxxxx',
callbackURL: 'http://localhost:4242/facebook/cb',
profileFields: ['id', 'name', 'displayName', 'photos', 'hometown', 'profileUrl'],
passReqToCallback: true
}, ...
您应该能够按照
中的说明指定profileFields
属性
点赞以获取大图:
passport.use(new FacebookStrategy({
// clientID, clientSecret and callbackURL
profileFields: ['id', 'displayName', 'picture.type(large)', ...]
},
// verify callback
...
));
或者您可以将 passport-facebook
模块的 strategy.js
文件第 221 行更改为
'photos': 'picture.type(large)'
见