Oauth HybridAuth getUserProfile返回尝试获取非对象的属性
我在谷歌、FB和Twitter上使用HybridAuth,FB工作正常,谷歌返回空用户档案 AccessToken还可以 getUserProfile()数据设置为空:Oauth HybridAuth getUserProfile返回尝试获取非对象的属性,oauth,google-oauth,hybridauth,Oauth,Google Oauth,Hybridauth,我在谷歌、FB和Twitter上使用HybridAuth,FB工作正常,谷歌返回空用户档案 AccessToken还可以 getUserProfile()数据设置为空: object(Hybrid_User)#8 (3) { ["providerId"]=> string(6) "Google" ["timestamp"]=> int(1452502079) ["profile"]=> object(Hybrid_User_Profile)#9 (22) { ["identif
object(Hybrid_User)#8 (3) { ["providerId"]=> string(6) "Google" ["timestamp"]=> int(1452502079) ["profile"]=> object(Hybrid_User_Profile)#9 (22) { ["identifier"]=> NULL ["webSiteURL"]=> NULL ["profileURL"]=> NULL ["photoURL"]=> NULL ["displayName"]=> NULL ["description"]=> NULL ["firstName"]=> NULL ["lastName"]=> NULL ["gender"]=> NULL ["language"]=> NULL ["age"]=> NULL ["birthDay"]=> NULL ["birthMonth"]=> NULL ["birthYear"]=> NULL ["email"]=> NULL ["emailVerified"]=> NULL ["phone"]=> NULL ["address"]=> NULL ["country"]=> NULL ["region"]=> NULL ["city"]=> NULL ["zip"]=> NULL } } } }
知道要检查什么吗?只是指向其他有相同行为的用户。 您可以通过在配置文件中添加参数来启用调试模式,如下所示
array(
"base_url" => "",
"providers" => array (
"Google" => array (
"enabled" => true,
"keys" => array ( "id" => "", "secret" => "" )
),
"Facebook" => array (
"enabled" => true,
"keys" => array ( "id" => "", "secret" => "" )
),
"Twitter" => array (
"enabled" => true,
"keys" => array ( "key" => "", "secret" => "" ),
"includeEmail" => true
),
),
// if you want to enable logging, set 'debug_mode' to true
"debug_mode" => false,
// then provide a writable file by the web server on "debug_file"
"debug_file" => "log.txt"
);
然后你可以检查日志,这是正确的使用谷歌用户数据我们需要在谷歌开发者控制台上启用谷歌+api,
在传播过程中需要等待一段时间#关闭正常,已修复。看起来项目中需要启用Google+API。