@Override
protected FacebookAuthInfo buildInfo(final WSResponse r)
throws AccessTokenException {
if (r.getStatus() >= 400) {
throw new AccessTokenException(r.asJson().get(ERROR).get(MESSAGE).asText());
} else {
final String query = r.getBody();
Logger.debug(query);
final List<NameValuePair> pairs = URLEncodedUtils.parse(
URI.create("/?" + query), "utf-8");
if (pairs.size() < 2) {
throw new AccessTokenException();
}
final Map<String, String> m = new HashMap<String, String>(
pairs.size());
for (final NameValuePair nameValuePair : pairs) {
m.put(nameValuePair.getName(), nameValuePair.getValue());