Open GoogleCodeExporter opened 8 years ago
已经处理
重新上传,请下载
多谢反馈
Original comment by haidong...@gmail.com
on 23 Aug 2011 at 9:59
Weibo.java 838 行 getPublicTimeline() 方法有错误,
public List<Status> getPublicTimeline() throws
WeiboException {
return Status.constructStatuses(get(getBaseURL() +
"statuses/public_timeline.json", true));
}
修改成以下方式可以工作:
public List<Status> getPublicTimeline() throws
WeiboException {
return Status.constructStatuses(get(getBaseURL() +
"statuses/public_timeline.json",
new PostParameter[]{
new PostParameter("source", Weibo.CONSUMER_KEY)
}, true));
}
Original comment by helinxi...@gmail.com
on 23 Aug 2011 at 11:08
这里判断有误造成的,修改如下即可。
protected Response get(String url, PostParameter[] params, boolean authenticate) throws WeiboException {
if (null!= params && params.length >0) {
String encodedParams = HttpClient.encodeParameters(params);
if (-1 == url.indexOf("?")) {
url += "?" + encodedParams;
} else {
url += "&" + encodedParams;
}
}
return http.get(url, authenticate);
}
Original comment by haidong...@gmail.com
on 24 Aug 2011 at 1:30
Original issue reported on code.google.com by
helinxi...@gmail.com
on 23 Aug 2011 at 7:47