I've been able to retrieve list of album by using the following:
final Facebook facebook = new FacebookTemplate(facebookAccessToken, appName);
final PagedList<Album> albumList = facebook.mediaOperations().getAlbums();
for (Album album : albumList) {
if (album.getName().equalsIgnoreCase("Profile Pictures")) {
PagingParameters pagingParameters = new PagingParameters(NO_OF_FB_PHOTOS, null, null, null);
final PagedList<org.springframework.social.facebook.api.Photo> profilePhotos =
facebook.mediaOperations().getPhotos(album.getId(), pagingParameters);
I've verified that albumList contains the correct number of albums as in my facebook account and the album ids match. However, the profilePhotos' Photo objects inside the Profile Pictures album contain null images & links; I can only get the ID and createdDate of the Photo objects....
I have obtained the user_photos permission in my client to obtain the access token. And I have also used Facebook's graph explorer to query using this accessToken and I was able to get the photo urls... Can someone please help point out what I'm missing? Thank you soo much
Update: I wonder if it's because of: "the new Facebook API v2.4 changed the way the response is being sent. Now you need to specify in the request url which fields you want the API to return so /me becomes /me?fields=email,name,etc..." (from facebook graph api returns only name and id for some websites)