简体   繁体   English

使用 HybridAuth 进行社交登录

[英]Social login with HybridAuth

I'm using HybridAuth to do a social login with Facebook.我正在使用HybridAuth通过 Facebook 进行社交登录。

I'm getting successfully the displayName and photoURL .我成功获得了displayNamephotoURL But, the email is returning empty.但是,电子邮件返回空。 Is there some configuration that I need to do at Facebook Developers Page?我需要在 Facebook 开发者页面上进行一些配置吗?

The default scope doesn't return email anymore, but you should configure that you want email returned in HybridAuth configuration, not FB Settings.默认范围不再返回电子邮件,但您应该配置希望在 HybridAuth 配置中返回电子邮件,而不是 FB 设置。

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

HybridAuth config.php: HybridAuth config.php:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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