int statusCode = response.getResponseCode();
if (statusCode != HttpStatus.SC_OK) {
// FacebookError error = new FacebookError(statusCode,
// "I guess you are not permitted to access this url. HTTP status code:"+statusCode, null);
responseString = new String(response.getContent());
throw new FacebookException(JSONToObjectTransformer.getError(responseString, statusCode));
}
responseString = new String(response.getContent());
} catch (HttpException e) {
throw new FacebookException("Http Exception while calling facebook!", e);
} catch (IOException e) {
throw new FacebookException("IO Exception while calling facebook!", e);
}
// if response string contains accessToken=xxx remove it!
// responseString = Util.replaceAccessToken(responseString, nameValuePairs);