Permalink
Browse files

Merge pull request #16 from stevebest/master

Return user profile picture
  • Loading branch information...
2 parents 0d209e9 + 63d143a commit 830442a117563ff18e4a6317b6a813d1a1cf0c3c @jaredhanson committed Jul 29, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 lib/passport-twitter/strategy.js
  2. +1 −0 test/strategy-test.js
@@ -113,6 +113,7 @@ Strategy.prototype.userProfile = function(token, tokenSecret, params, done) {
profile.id = json.id;
profile.username = json.screen_name;
profile.displayName = json.name;
+ profile.photos = [{ value: json.profile_image_url_https }];
profile._raw = body;
profile._json = json;
View
@@ -58,6 +58,7 @@ vows.describe('TwitterStrategy').addBatch({
assert.equal(profile.id, '6253282');
assert.equal(profile.username, 'twitterapi');
assert.equal(profile.displayName, 'Twitter API');
+ assert.equal(profile.photos[0].value, 'https://si0.twimg.com/profile_images/1438634086/avatar_normal.png');
},
'should set raw property' : function(err, profile) {
assert.isString(profile._raw);

0 comments on commit 830442a

Please sign in to comment.