Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oauth HybridAuth getUserProfile返回尝试获取非对象的属性_Oauth_Google Oauth_Hybridauth - Fatal编程技术网

Oauth HybridAuth 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

我在谷歌、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) { ["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。