public class GetUserTimelineIds {
public static void main(String[] args) {
// String access_token = args[0];
String access_token = "2.009q4JaB0boMkW8e5efb98210m4BKY";
Timeline tm = new Timeline();
// tm.client.setToken(access_token);
tm.setToken(access_token);
try {
// JSONObject ids = tm.getUserTimelineIdsByUid(args[1]);
JSONObject ids = tm.getUserTimelineIdsByUid("1450317544");
Log.logInfo(ids.toString());
JSONArray array = (JSONArray) ids.get("statuses");
ArrayList<String> list = new ArrayList<String>();
for (int i = 0; i < array.length(); ++i) {
list.add(array.get(i).toString());
}
System.out.println(list.size());
StatusWapper wrapper = tm.getUserTimelineByUid("1450317544", new Paging(1), 0, 0);
System.out.println(wrapper.getStatuses().size());
wrapper = tm.getUserTimelineByUid("1450317544", new Paging(2), 0, 0);
System.out.println(wrapper.getStatuses().size());
} catch (Exception e) {
e.printStackTrace();
}
}