调用新浪api接口,测试发布信息时不成功,报如下错误,望高手指点!

[Fri Aug 05 20:45:37 CST 2011]Request: 
[Fri Aug 05 20:45:37 CST 2011]POST http://api.t.sina.com.cn/statuses/update.json
[Fri Aug 05 20:45:37 CST 2011]OAuth base string:POST&http%3A%2F%2Fapi.t.sina.com.cn%2Fstatuses%2Fupdate.json&oauth_consumer_key%3D2427394021%26oauth_nonce%3D100148916%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1312548337%26oauth_token%3D2427394021%26oauth_version%3D1.0%26source%3D2427394021%26source%3D2427394021%26status%3DThe%2520night%2520deep%252Cpeople%2520sleeping.
[Fri Aug 05 20:45:37 CST 2011]OAuth signature:I5UkUbqyyYmW+oO+lj/ZopMHxWo=
[Fri Aug 05 20:45:37 CST 2011]Authorization: OAuth oauth_consumer_key="2427394021",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1312548337",oauth_nonce="100148916",oauth_version="1.0",oauth_token="2427394021",oauth_signature="I5UkUbqyyYmW%2BoO%2Blj%2FZopMHxWo%3D"
[Fri Aug 05 20:45:37 CST 2011]X-Weibo-Client-Version: 1.2.0
[Fri Aug 05 20:45:37 CST 2011]Accept-Encoding: gzip
[Fri Aug 05 20:45:37 CST 2011]User-Agent: weibo4j http://open.t.sina.com.cn/ /1.2.0
[Fri Aug 05 20:45:37 CST 2011]X-Weibo-Client-URL: http://open.t.sina.com.cn/-1.2.0.xml
[Fri Aug 05 20:45:37 CST 2011]Post Params: status=The+night+deep%2Cpeople+sleeping.&source=2427394021&source=2427394021
[Fri Aug 05 20:45:37 CST 2011]Response: 
[Fri Aug 05 20:45:37 CST 2011]HTTP/1.1 401 Unauthorized
[Fri Aug 05 20:45:37 CST 2011]X-Varnish: 1904759655
[Fri Aug 05 20:45:37 CST 2011]Age: 0
[Fri Aug 05 20:45:37 CST 2011]Date: Fri, 05 Aug 2011 12:45:41 GMT
[Fri Aug 05 20:45:37 CST 2011]Content-Length: 99
[Fri Aug 05 20:45:37 CST 2011]Expires: Thu, 01 Jan 1970 00:00:00 GMT
[Fri Aug 05 20:45:37 CST 2011]Via: 1.1 varnish
[Fri Aug 05 20:45:37 CST 2011]Content-Type: application/json;charset=UTF-8
[Fri Aug 05 20:45:37 CST 2011]Connection: keep-alive
[Fri Aug 05 20:45:37 CST 2011]Server: weibo
[Fri Aug 05 20:45:37 CST 2011]Pragma: No-cache
[Fri Aug 05 20:45:37 CST 2011]Cache-Control: no-cache
weibo4j.WeiboException: 401:Authentication credentials were missing or incorrect.
{"request":"/statuses/update.json","error_code":"401","error":"40113:Oauth Error: token_rejected!"}


at weibo4j.http.HttpClient.httpRequest(HttpClient.java:666)
at weibo4j.http.HttpClient.httpRequest(HttpClient.java:605)
at weibo4j.http.HttpClient.post(HttpClient.java:420)
at weibo4j.Weibo.updateStatus(Weibo.java:1307)
at weibo4j.examples.statuses.UpdateStatus.main(UpdateStatus.java:27)
[Fri Aug 05 20:45:37 CST 2011]{"request":"/statuses/update.json","error_code":"401","error":"40113:Oauth Error: token_rejected!"}

你可能感兴趣的:(api,测试,Authentication,token,authorization,credentials)