我正在尝试使用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”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传输编码=>分块)
[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’=>‘=>’,'oauth_rsa_key‘=> '',
有人知道我可能做错了什么吗?
如何存储返回到数据库的令牌??因为如果服务器重新启动,缓存就会丢失,用户必须再次进行身份验证。
发布于 2010-07-22 20:11:21
问题出在我经过的域名上。我没有传递example.com,而是传递了http://example.com。因此,请确保正确传递site_name、oauth_consumer_key和域变量。
https://stackoverflow.com/questions/3290016
复制相似问题