Out of range value for column 'bindUid' at row 1

今天弄新浪微博绑定,数据库oauth_token表需要插入bindUid耶就是新浪微博账户uid。第一步绑定获取token时候是获取不到uid的,因为AccessToken 类里面 uid没有 get方法。

public AccessToken(Response res) throws WeiboException{
		super(res);
		JSONObject json =res.asJSONObject();
		try{
			accessToken = json.getString("access_token");
			expireIn = json.getString("expires_in");
			refreshToken = json.getString("refresh_token");
			uid = json.getString("uid");
		} catch (JSONException je) {
			throw new WeiboException(je.getMessage() + ":" + json.toString(), je);
		}
	}

public String getAccessToken() {
		return accessToken;
	}
	public String getExpireIn() {
		return expireIn;
	}
	public String getRefreshToken() {
		return refreshToken;
	}
 

 没有getUid所以获取不到uid的,只能重新编译并打jar包引入程序。

插入数据库过程中报错,因为新浪微博uid是string的并且超过了Int范围。

猜你喜欢

转载自woshixushigang.iteye.com/blog/1601309