App Key和App Secret都没写错,在SDK下单config.properties这个文件中也填入了对应的信息,OAuth4Code在这里测试的时候,浏览器打开了也获取到了code认证码,之后输入code就是不能获取到access token ,错误信息是:
https://api.weibo.com/oauth2/authorize?client_id=App Key&redirect_uri=http://weibo.com/54zqf&response_type=code Hit enter when it"s done.[Enter]:5579e1d701d9668ebc485c12072b465b 0 INFO [2014-12-24 15:34:38] code: 5579e1d701d9668ebc485c12072b465b 4 DEBUG [2014-12-24 15:34:38] Request: 4 DEBUG [2014-12-24 15:34:38] POSThttps://api.weibo.com/oauth2/access_token 737 DEBUG [2014-12-24 15:34:39] Response: 737 DEBUG [2014-12-24 15:34:39] https StatusCode:401 737 DEBUG [2014-12-24 15:34:39] Server:nginx/1.2.0 737 DEBUG [2014-12-24 15:34:39] Date:Wed, 24 Dec 2014 07:34:33 GMT 737 DEBUG [2014-12-24 15:34:39] Transfer-Encoding:chunked 737 DEBUG [2014-12-24 15:34:39] Connection:keep-alive 737 DEBUG [2014-12-24 15:34:39] Pragma:No-cache 737 DEBUG [2014-12-24 15:34:39] Cache-Control:no-cache 738 DEBUG [2014-12-24 15:34:39] Expires:Thu, 01 Jan 1970 00:00:00 GMT 738 DEBUG [2014-12-24 15:34:39] Api-Server-IP:10.73.89.46 739 WARN [2014-12-24 15:34:39] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. 740 DEBUG [2014-12-24 15:34:39] {"error":"invalid_client","error_code":21324,"request":"/oauth2/access_token","error_uri":"/oauth2/access_token","error_description":"client_secret error."} 743 INFO [2014-12-24 15:34:39] Unable to get the access token.
不清楚是怎么回事。求指导决。
解决方案