Update to use bigger avatar image and twitter now use screen_name based profile image url

This commit is contained in:
Cheng-Han, Wu 2016-05-20 02:13:22 +08:00
parent 97befb6238
commit bbc7e26e77

View file

@ -64,10 +64,10 @@ module.exports = function (sequelize, DataTypes) {
photo = 'https://graph.facebook.com/' + profile.id + '/picture';
break;
case "twitter":
photo = profile.photos[0].value;
photo = 'https://twitter.com/' + profile.username + '/profile_image?size=bigger';
break;
case "github":
photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=48';
photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=96';
break;
case "gitlab":
photo = profile.avatarUrl;