简体   繁体   中英

Social login with HybridAuth

I'm using HybridAuth to do a social login with Facebook.

I'm getting successfully the displayName and photoURL . But, the email is returning empty. Is there some configuration that I need to do at Facebook Developers Page?

The default scope doesn't return email anymore, but you should configure that you want email returned in HybridAuth configuration, not FB Settings.

FB Docs: https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-email

HybridAuth config.php:

"Facebook" => array(
    "enabled" => true,
    "keys" => array("id" => "x", "secret" => "xxx"),
    "scope" => "public_profile, email",
    "trustForwarded" => false
),

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM