【问题标题】:Zend oauth scopes for google profile谷歌配置文件的 Zend oauth 范围
【发布时间】:2012-07-18 18:05:24
【问题描述】:

有人可以告诉我,作为使用 zend oauth php 获取 google 用户帐户的个人资料图片的范围,我将给出什么范围

require_once 'Zend/Oauth/Consumer.php';
        $SCOPES = array(
            'https://www.googleapis.com/auth/userinfo#email',
            'https://mail.google.com/',
            'http://www.google.com/calendar/feeds/',
            'https://www.google.com/m8/feeds/'
        );

当我给 https://www.googleapis.com/auth/userinfo#profile 时,它正在抛出错误

任何帮助将不胜感激

【问题讨论】:

    标签: zend-framework oauth


    【解决方案1】:

    userinfo 作用域的正确名称是:

    https://www.googleapis.com/auth/userinfo.email
    https://www.googleapis.com/auth/userinfo.profile
    

    我认为OAuth 2.0 Playground 提供了最完整的 Google OAuth 范围概述。

    【讨论】:

      【解决方案2】:

      尝试使用句号而不是井号。我能够在http://googlecodesamples.com/oauth_playground/ 的 OAuth 1 操场上成功验证 https://www.googleapis.com/auth/userinfo.profile。如果这不起作用,请将您的请求与 Playground 中的等效请求进行比较。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-02-29
        • 1970-01-01
        相关资源
        最近更新 更多