首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >google buzz api错误

google buzz api错误
EN

Stack Overflow用户
提问于 2010-07-20 20:45:50
回答 1查看 244关注 0票数 0

我正在尝试使用google buzz api向我的google buzz帐户发布一些内容。我尝试使用他们提供的示例代码,但出现以下错误

代码语言:javascript
复制
Array

( http_code => 401报头应用程序数组( WWW-Authenticate => AuthSub realm="https://www.google.com/accounts/AuthSubRequest“allowed-scopes="https://www.googleapis.com/auth/buzz”Content-Type =>应用程序/json;字符集=UTF-8 Date => Tue,20 Jul 2010 12:22:05 GMT Expires => Tue,20 Jul 2010 12:22:05缓存-控制=>私有,最大年龄=0 X-内容-类型-选项=> nosniff X-Frame-Options => SAMEORIGIN X-XSS- => 1;mode=block => GSE传输编码=>分块)

代码语言:javascript
复制
[data] => Array
    (
        [error] => Array
            (
                [errors] => Array
                    (
                        [0] => Array
                            (
                                [message] => User must have authorized this application to have the following scope in order to make this call: [https://www.googleapis.com/auth/buzz]  Also , make sure your application is using the Buzz specific OAuth authorization URL.
                                [locationType] => header
                                [location] => Authorization
                            )

                    )

                [code] => 401
                [message] => User must have authorized this application to have the following scope in order to make this call: [https://www.googleapis.com/auth/buzz]  Also , make sure your application is using the Buzz specific OAuth authorization URL.
            )

    )

)

我已经在config.php文件中添加了所需的变量

代码语言:javascript
复制
'site_name' => 'example.com',

'oauth_consumer_key‘=> 'example.com','oauth_consumer_secret’=>‘=>’,'oauth_rsa_key‘=> '',

有人知道我可能做错了什么吗?

如何存储返回到数据库的令牌??因为如果服务器重新启动,缓存就会丢失,用户必须再次进行身份验证。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-07-22 20:11:21

问题出在我经过的域名上。我没有传递example.com,而是传递了http://example.com。因此,请确保正确传递site_name、oauth_consumer_key和域变量。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3290016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档