I am integrating facebook, twitter, github, linkedin using https://oauth.io/signin third party site. I integrated facebook and was able to successfully get id, name, gender properties directly but am seeing difficulty in getting email address, location values.
In oauth.io site, I even added scope permissions for facebook
I am using the below code to get info of the logged in user.
OAuth.popup('facebook')
.done(function (result) {
res = result;
result.me().done(function (response) {
debugger;
console.log('me ' + response.name);
console.log('me ' + response.email);
});
})
.fail(function (error) {
alert('fail');
});
I even tried filtering the results only to give email, birthdate values using
OAuth.popup('facebook')
.done(function (result) {
res = result;
result.me(['email', 'birthdate', 'location']).done(function (response) {
debugger;
console.log('me ' + response.name);
console.log('me ' + response.email);
});
})
.fail(function (error) {
alert('fail');
});
But it just returned empty object. Can some one let me know if I am missing something?