Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.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
Php 如何在oauth2之后使用hwioauthBundle获取google帐户电子邮件地址_Php_Symfony_Google Api_Hwioauthbundle - Fatal编程技术网

Php 如何在oauth2之后使用hwioauthBundle获取google帐户电子邮件地址

Php 如何在oauth2之后使用hwioauthBundle获取google帐户电子邮件地址,php,symfony,google-api,hwioauthbundle,Php,Symfony,Google Api,Hwioauthbundle,如何访问用户的电子邮件地址。我正在使用内置的 hwi_oauth.user.provider 最好的方法是什么 这是我的config.yml resource_owners: google: type: google client_id: <CLIENTID> client_secret: <SECRET> scope:

如何访问用户的电子邮件地址。我正在使用内置的 hwi_oauth.user.provider

最好的方法是什么

这是我的config.yml

    resource_owners:
    google:
        type:                google
        client_id:           <CLIENTID>
        client_secret:       <SECRET>
        scope:               "email profile https://spreadsheets.google.com/feeds https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.login"
        paths:
            email:           email

我不知道,但一年前我使用HWIOauth来,我的配置如下所示:

google:
            type:                google
            client_id:           client_id
            client_secret:       secret
            scope:               "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"

它会把邮件还给我。但也许谷歌改变了一些我不知道的事情,希望这能有所帮助:)

我不知道,但一年前我使用了HWIOauth,我的配置如下:

google:
            type:                google
            client_id:           client_id
            client_secret:       secret
            scope:               "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"

它会把邮件还给我。但也许谷歌改变了一些我不知道的事情,希望这能有所帮助:)

到目前为止你做了什么?你能告诉我们你尝试访问用户电子邮件的代码吗?你解决了吗?请告诉我你是怎么做的,谢谢你到目前为止做了什么?你能告诉我们你尝试访问用户电子邮件的代码吗?你解决了吗?请告诉我你是怎么做的,谢谢