【发布时间】:2014-07-09 06:45:26
【问题描述】:
我正在使用 OAuth2.0 连接到 Google 并尝试获取用户详细信息。我正在获取电子邮件 ID 等。但我无法从我收到的 access_token 中获取名称和其他数据。
目前我正在使用scopes - 'https://www.googleapis.com/auth/plus.me','email'。
我知道有一个作用域https://www.googleapis.com/plus/v1/people/me,但是当我使用它时,我得到了无效作用域错误。但是,我手动访问https://www.googleapis.com/plus/v1/people/me?access_token=# 然后它工作得很好。但是通过API它不起作用:(
有什么线索吗?
我正在使用 PHP 的 Google Api 将 $client 实例化为 new Google_Client();。
【问题讨论】:
标签: php oauth-2.0 google-api google-oauth google-api-php-client