List of usage examples for org.springframework.social.facebook.api ImageType toString
public String toString()
From source file:org.springframework.social.facebook.api.impl.FacebookTemplate.java
public byte[] fetchImage(String objectId, String connectionType, ImageType type) { URI uri = URIBuilder/* www.j a va 2 s . co m*/ .fromUri(GRAPH_API_URL + objectId + "/" + connectionType + "?type=" + type.toString().toLowerCase()) .build(); ResponseEntity<byte[]> response = getRestTemplate().getForEntity(uri, byte[].class); if (response.getStatusCode() == HttpStatus.FOUND) { throw new UnsupportedOperationException( "Attempt to fetch image resulted in a redirect which could not be followed. Add Apache HttpComponents HttpClient to the classpath " + "to be able to follow redirects."); } return response.getBody(); }