private JSONObject getJSONObjectFromPostURL(String url) throws Exception {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.setUser(id1.screenName);
builder.setPassword(id1.password);
return getJSONObjectFromPostURL(url, builder.build());
}
private JSONObject getJSONObjectFromGetURL(String url, Configuration conf) throws Exception {
HttpClient http = HttpClientFactory.getInstance(conf.getHttpClientConfiguration());
return http.get(url, null, getOAuthOuthorization(conf), null).asJSONObject();