Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ hello.on('auth.login', function(auth) {
label.id = 'profile_' + auth.network;
document.getElementById('profile').appendChild(label);
}
label.innerHTML = '<img src="' + r.thumbnail + '" /> Hey ' + r.name;
label.innerHTML = '<img src="' + r.picture + '" /> Hey ' + r.name;
});
});
```
Expand Down
2 changes: 1 addition & 1 deletion assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ if (document.getElementById('profile')) {
label.id = 'profile_' + auth.network;
document.getElementById('profile').appendChild(label);
}
label.innerHTML = '<img src="' + r.thumbnail + '" /> Hey ' + r.name;
label.innerHTML = '<img src="' + r.picture + '" /> Hey ' + r.name;
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion demos/facebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Get profile</h2>
// get user profile data
return facebook.api('me');
}).then(function(p) {
document.getElementById('profile').innerHTML = "<img src='"+ p.thumbnail + "' width=24/>Connected to "+ network +" as " + p.name;
document.getElementById('profile').innerHTML = "<img src='"+ p.picture + "' width=24/>Connected to "+ network +" as " + p.name;
});
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions demos/helper/uiProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ hello.on('auth.login', function(r) {
// Get Profile
hello( r.network ).api( '/me' ).then( function(p) {
var label = document.getElementById(r.network);
label.innerHTML = "<img src='"+ p.thumbnail + "' width=24/>Connected to "+ r.network+" as " + p.name;
label.innerHTML = "<img src='"+ p.picture + "' width=24/>Connected to "+ r.network+" as " + p.name;

// On chrome apps we're not able to get remote images
// This is a workaround
if (typeof(chrome) === 'object') {
img_xhr(label.getElementsByTagName('img')[0], p.thumbnail);
img_xhr(label.getElementsByTagName('img')[0], p.picture);
}
});
});
Expand Down
24 changes: 12 additions & 12 deletions tests/specs/unit/modules/apiMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('hello.api(\'/me\')', function() {
network: 'bikeindex',
expect: {
id: '13674',
thumbnail: undefined
picture: undefined
},
errorExpect: {
code: 'access_denied',
Expand All @@ -21,7 +21,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: '197571718',
name: 'Jane McGee',
thumbnail: 'https://app.box.com/api/avatar/large/197571718'
picture: 'https://app.box.com/api/avatar/large/197571718'
},
errorExpect: false
},
Expand All @@ -30,7 +30,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: 374434467,
name: 'Jane McGee',
thumbnail: undefined
picture: undefined
},
errorExpect: {
code: 'server_error',
Expand All @@ -42,7 +42,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: '100008806508341',
name: 'Jane McGee',
thumbnail: 'https://graph.facebook.com/100008806508341/picture'
picture: 'https://graph.facebook.com/100008806508341/picture'
},
errorExpect: {
code: 190,
Expand All @@ -54,7 +54,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: '34790912@N05',
name: 'Jane McGee',
thumbnail: 'https://farm4.staticflickr.com/3729/buddyicons/34790912@N05_l.jpg'
picture: 'https://farm4.staticflickr.com/3729/buddyicons/34790912@N05_l.jpg'
},
errorExpect: {
code: 'invalid_request',
Expand All @@ -78,7 +78,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: 10398423,
name: 'janemcgee35',
thumbnail: 'https://avatars.githubusercontent.com/u/10398423?v=3'
picture: 'https://avatars.githubusercontent.com/u/10398423?v=3'
},
errorExpect: false
},
Expand All @@ -87,7 +87,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: '115111284799080900590',
name: 'Jane McGee',
thumbnail: 'https://lh3.googleusercontent.com/-NWCgcgRDieE/AAAAAAAAAAI/AAAAAAAAABc/DCi-M8IuzMo/photo.jpg?sz=50'
picture: 'https://lh3.googleusercontent.com/-NWCgcgRDieE/AAAAAAAAAAI/AAAAAAAAABc/DCi-M8IuzMo/photo.jpg?sz=50'
},
errorExpect: {
code: 403,
Expand All @@ -111,7 +111,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: 'janemcgee35@join.me',
name: 'Jane McGee',
thumbnail: undefined
picture: undefined
},
errorExpect: false
},
Expand All @@ -132,7 +132,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: 131420710,
name: 'janemcgee35',
thumbnail: 'https://i1.sndcdn.com/avatars-000123511300-upb183-large.jpg'
picture: 'https://i1.sndcdn.com/avatars-000123511300-upb183-large.jpg'
},
errorExpect: false
},
Expand All @@ -153,7 +153,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: 434460,
name: 'Юрий Опарин',
thumbnail: 'http://cs304605.vk.me/u434460/d_1acca7c0.jpg'
picture: 'http://cs304605.vk.me/u434460/d_1acca7c0.jpg'
},
errorExpect: {
code: 10,
Expand All @@ -165,7 +165,7 @@ describe('hello.api(\'/me\')', function() {
expect: {
id: '939f37452466502a',
name: 'Jane McGee',
thumbnail: 'https://apis.live.net/v5.0/939f37452466502a/picture?access_token=token'
picture: 'https://apis.live.net/v5.0/939f37452466502a/picture?access_token=token'
},
errorExpect: {
code: 'request_token_invalid',
Expand Down Expand Up @@ -196,7 +196,7 @@ describe('hello.api(\'/me\')', function() {
.then(function(me) {
expect(me.id).to.be(test.expect.id);
expect(me.name).to.be(test.expect.name);
expect(me.thumbnail).to.be(test.expect.thumbnail);
expect(me.picture).to.be(test.expect.picture);
done();
})
.then(null, done);
Expand Down