Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Include user's email in profile if returned from facebook API #1193

Merged
merged 1 commit into from
Jan 18, 2018
Merged
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
4 changes: 2 additions & 2 deletions lib/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function Facebookbot(configuration) {
first_name: identity.first_name,
last_name: identity.last_name,
full_name: identity.first_name + ' ' + identity.last_name,
email: null, // no source for this info
email: identity.email || null,
gender: identity.gender,
timezone_offset: identity.timezone,
};
Expand Down Expand Up @@ -765,7 +765,7 @@ function Facebookbot(configuration) {

var user_profile = function(uid, fields, cb) {
if (!fields) {
fields = 'first_name,last_name,timezone,gender,locale';
fields = 'first_name,last_name,timezone,gender,locale,email';
}
return new Promise(function(resolve, reject) {
var uri = 'https://' + api_host + '/v2.6/' + uid + '?fields=' + fields + '&access_token=' + configuration.access_token;
Expand Down