我正在调用facebook的图表api,它返回的状态为200,但内容为空。当我在浏览器中进行完全相同的调用时,它返回数据。有任何想法吗?以下是我尝试拨打的电话的代码段:
String appAccessToken = ((TestApplication)observer.getContext().getApplicationContext()).getAppAccessToken();
String url = "https://graph.facebook.com/search?q=school&type=place&access_token=" + URLEncoder.encode(appAccessToken, "UTF8") ;
DefaultHttpClient client = new DefaultHttpClient();
HttpGet get = new HttpGet(url);
HttpResponse response = client.execute(get);