【发布时间】:2011-03-18 10:18:09
【问题描述】:
我正在尝试使用 Google Buzz API 将一些内容发布到我的 Google Buzz 帐户。 我尝试使用他们提供的示例代码,但它给出了以下错误
Array
( [http_code] => 401 [标题] => 数组 ( [WWW-Authenticate] => AuthSub realm="https://www.google.com/accounts/AuthSubRequest" allowed-scopes="https://www.googleapis.com/auth/buzz" [内容类型] => 应用程序/json;字符集=UTF-8 [日期] => 2010 年 7 月 20 日星期二 12:22:05 GMT [过期] => 2010 年 7 月 20 日星期二 12:22:05 GMT [缓存控制] => 私有,最大年龄 = 0 [X-Content-Type-Options] => nosniff [X-Frame-Options] => SAMEORIGIN [X-XSS-保护] => 1;模式=块 [服务器] => GSE [传输编码] => 分块 )
[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 文件中添加了所需的变量
'site_name' => 'example.com',
'oauth_consumer_key' => 'example.com', 'oauth_consumer_secret' => 'consumersecret', 'oauth_rsa_key' => '',
有人知道我在这里做错了什么吗??
如何存储返回到数据库的令牌?因为如果服务器重新启动,缓存会丢失,用户必须再次进行身份验证。
【问题讨论】:
标签: database api storage google-buzz