Example #1
0
 @Override
 protected TwitterProfile extractUserProfile(final String body) {
   final TwitterProfile profile = new TwitterProfile();
   final JsonNode json = JsonHelper.getFirstNode(body);
   if (json != null) {
     profile.setId(JsonHelper.get(json, "id"));
     for (final String attribute :
         OAuthAttributesDefinitions.twitterDefinition.getAllAttributes()) {
       profile.addAttribute(attribute, JsonHelper.get(json, attribute));
     }
   }
   return profile;
 }