Plugin Directory

Changeset 1200529


Ignore:
Timestamp:
07/16/2015 09:46:43 PM (11 years ago)
Author:
miled
Message:

Fix an issue where Facebook returns an empty email due to recent API changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-social-login/trunk/hybridauth/Hybrid/Providers/Facebook.php

    r1022721 r1200529  
    172172            $this->setAccessToken();
    173173
    174             $data = $this->api->api('/me');
     174            $fields = array(
     175                'id', 'name', 'first_name', 'last_name', 'link', 'website',
     176                'gender', 'locale', 'about', 'email', 'hometown', 'location'
     177            );
     178
     179            $data = $this->api->api('/me?fields=' . implode(',', $fields));
    175180        }
    176181        catch( FacebookApiException $e ){
Note: See TracChangeset for help on using the changeset viewer.