应用未通过审核时,只能加15个测试 用户 。 private void jbutton2actionperformed(java.awt.event.actionevent evt) throws weiboexception, ioexception, jsonexception { // todo add your handling code here: string code = jtextfield1.gettext().tost
应用未通过审核时,只能加15个测试用户。
private void jbutton2actionperformed(java.awt.event.actionevent evt)
throws weiboexception, ioexception, jsonexception {
// todo add your handling code here:
string code = jtextfield1.gettext().tostring();
try {
access_taken=oauth.getaccesstokenbycode(code).getaccesstoken();
account am = new account();
am.client.settoken(access_taken);
try {
user_id = am.getuid().getstring(uid);
system.out.println(user_id);
//log.loginfo(uid.tostring());
} catch (weiboexception e) {
e.printstacktrace();
}
} catch (weiboexception e) {
if (401 == e.getstatuscode()) {
log.loginfo(unable to get the access token.);
} else {
e.printstacktrace();
}
}
}
需要添加异常处理。