Php 使用OAuth2的谷歌阅读器订阅

Php 使用OAuth2的谷歌阅读器订阅,php,codeigniter,oauth,google-oauth,Php,Codeigniter,Oauth,Google Oauth,我正试图通过OAuth2从谷歌阅读器获取我的订阅列表。 我用的是Codeigniter和a。我可以毫无问题地获得scren的权限,并授予googlereader权限。问题是,当我在完成身份验证后得到回调头时,它会给我一个403禁止的头 以下是我的库选项: $config['opauth_config'] = array( 'path' => '/mixordia/index.php/oauth/login/', //example: /ci_opauth/auth/logi

我正试图通过OAuth2从谷歌阅读器获取我的订阅列表。 我用的是Codeigniter和a。我可以毫无问题地获得scren的权限,并授予googlereader权限。问题是,当我在完成身份验证后得到回调头时,它会给我一个403禁止的头

以下是我的库选项:

    $config['opauth_config'] = array(
    'path' => '/mixordia/index.php/oauth/login/', //example: /ci_opauth/auth/login/
    'callback_url' => '/mixordia/index.php/oauth/authenticate/', //example: /ci_opauth/auth/authenticate/
    'callback_transport' => 'get', //Codeigniter don't use native session
    'security_salt' => 'mixordias_salt_whwhwh_wayacross',
    'debug' => true,
    'Strategy' => array(
        'Google' => array(
            'client_id' => 'MY_ID',
            'client_secret' => 'MY_SECRET',
            'service' => 'reader',
            'source' => 'APP Name',
            'scope' => 'http://www.google.com/reader/api'
        )
    )
);
以下是我得到的:

Array
(
[error] => Array
    (
        [provider] => Google
        [code] => userinfo_error
        [message] => Failed when attempting to query for user information
        [raw] => Array
            (
                [response] => 0
                [headers] => HTTP/1.0 403 Forbidden
WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest",     error=insufficient_scope, scope="https://www.googleapis.com/auth/userinfo.id h ttps://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.login https://www.google.com/accounts/OAuthLogin"
Content-Type: application/json; charset=UTF-8
Date: Thu, 13 Jun 2013 12:26:25 GMT
Expires: Thu, 13 Jun 2013 12:26:25 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
            )

    )

[timestamp] => 2013-06-13T12:26:25+00:00
)

我已经坚持了两天,我不知道我在图书馆的申请中做错了什么。您能帮助我吗?

库尝试,这需要userinfo.profile scope()。将该范围添加到您的配置中,它应该可以正常工作。

如果您不知道的话。谷歌阅读器很快就会消失。