Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Adjust profile image URLs on Fb and Twitter strategies
Browse files Browse the repository at this point in the history
For Fb, use the Graph API. For twitter, use the 'bigger' profile image. Larger profile images (like the one provided by Google) could provide more flexibility.
  • Loading branch information
igorauad committed Feb 6, 2015
1 parent 1e450b4 commit 12766c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/users/server/config/strategies/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function(config) {
lastName: profile.name.familyName,
displayName: profile.displayName,
email: profile.emails[0].value,
profileImageURL: (profile.photos && profile.photos.length) ? profile.photos[0].value : undefined,
profileImageURL: (profile.id) ? '//graph.facebook.com/' + profile.id + '/picture?type=large' : undefined,
provider: 'facebook',
providerIdentifierField: 'id',
providerData: providerData
Expand Down
2 changes: 1 addition & 1 deletion modules/users/server/config/strategies/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function(config) {
var providerUserProfile = {
displayName: profile.displayName,
username: profile.username,
profileImageURL: (profile.photos && profile.photos.length) ? profile.photos[0].value : undefined,
profileImageURL: profile.photos[0].value.replace('normal', 'bigger'),
provider: 'twitter',
providerIdentifierField: 'id_str',
providerData: providerData
Expand Down

0 comments on commit 12766c1

Please sign in to comment.