Status.constructJson方法,当微博不包含缩略图时抛WeiboException
Opened this issue · 0 comments
GoogleCodeExporter commented
版本:2.1.1-beta2-2
代码:
Timeline tm = new Timeline();
tm.client.setToken(accessToken);
StatusWapper status = tm.getUserTimeline();
异常栈:
Exception in thread "main" weibo4j.model.WeiboException:
JSONObject["thumbnail_pic"] not found.:......
at weibo4j.model.Status.constructJson(Status.java:86)
at weibo4j.model.Status.<init>(Status.java:108)
at weibo4j.model.Status.constructWapperStatus(Status.java:324)
at weibo4j.Timeline.getUserTimeline(Timeline.java:190)
at ma.weibohelper.Main.main(Main.java:46)
Caused by: org.json.JSONException: JSONObject["thumbnail_pic"] not found.
at org.json.JSONObject.get(JSONObject.java:499)
at org.json.JSONObject.getString(JSONObject.java:670)
at weibo4j.model.Status.constructJson(Status.java:67)
... 4 more
按照微博API的描述(http://open.weibo.com/wiki/2/statuses/user_timeline��
�,thumbnail_pic应该是可选字段,不应该报错。
Original issue reported on code.google.com by maxup...@gmail.com
on 2 Aug 2013 at 6:47