public class OAuth4Code {
public static void main(String [] args) throws WeiboException, IOException{
Oauth oauth = new Oauth();
BareBonesBrowserLaunch.openURL(oauth.authorize("code"));
System.out.println(oauth.authorize("code"));//
System.out.println("Hit enter when it's done.[Enter]:");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Hit enter when it's done ###.[Enter]:"); String code = br.readLine();
Log.logInfo("code: " + code);
try{
System.out.println(oauth.getAccessTokenByCode(code));
} catch (WeiboException e) {
if(401 == e.getStatusCode()){
Log.logInfo("Unable to get the access token.");
}else{
e.printStackTrace();
}
}
}}是一段OUATH2认证的SDK中的代码,System.out.println(oauth.authorize("code"))输出为https://api.weibo.com/oauth2/authorize?client_id=&redirect_uri=&response_type=code     我想问的是为什么String code = br.readLine(); 这行可以读出CODE呢BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
这行不是等控制台输入么?控制台要输入CODE么?还是自动会导入CODE?