Php 如何在oauth2之后使用hwioauthBundle获取google帐户电子邮件地址
如何访问用户的电子邮件地址。我正在使用内置的 hwi_oauth.user.provider 最好的方法是什么 这是我的config.ymlPhp 如何在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:
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"
它会把邮件还给我。但也许谷歌改变了一些我不知道的事情,希望这能有所帮助:)到目前为止你做了什么?你能告诉我们你尝试访问用户电子邮件的代码吗?你解决了吗?请告诉我你是怎么做的,谢谢你到目前为止做了什么?你能告诉我们你尝试访问用户电子邮件的代码吗?你解决了吗?请告诉我你是怎么做的,谢谢