我创建了一个应用程序,我想在其中列出我所有的关注者。为此,我必须通过 twitter api,
https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi
我正在研究它,我尝试下面的代码来获取它的响应,
HttpPost post = new HttpPost("https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi");
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);
Log.i(TAG,"Response---"+responseText);
那个日志是这样打印的,
Response---{"error":"\u0907\u0938 \u0935\u093f\u0927\u093f \u0915\u094b \u091c\u0940\u0908\u091f\u0940 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0939\u0948.","request":"\/1\/followers\/ids.json?cursor=-1&screen_name=twitterapi"}
你能告诉我获得响应的正确方法,这样我就可以获取 Json 数组了吗?
提前致谢。