Open GoogleCodeExporter opened 9 years ago
Action请求端代码如下:
Oauth oauth = new Oauth();
BareBonesBrowserLaunch.openURL(oauth.authorize("code",""));
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String code = br.readLine();
logger.info("------------------------------------------->>>>>>>>>code = "+code);
try {
System.out.println(oauth.getAccessTokenByCode(code));
} catch (WeiboException e) {
if (401 == e.getStatusCode()) {
logger.info("Unable to get the access token.");
} else {
e.printStackTrace();
}
}
Original comment by Andy.deqiang
on 15 Jun 2013 at 2:15
Original issue reported on code.google.com by
Andy.deqiang
on 15 Jun 2013 at 2:06