Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
some FB API calls can't handle the limit attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew01ait committed Oct 16, 2015
1 parent 7f36481 commit a4fd00e
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,11 @@ public static void generateAll(FacebookClient fbc, Facebook facebook, File dir,
listProps.put(PropertyFile.USER.toString(), path);

// the Graph API only returns friends who are using this app, so it is useless to fetch them

Connection<Album> albums = fbc.fetchConnection("me/albums", Album.class, MasterParameter.getParameterByClass(Album.class),
Parameter.with("limit", 200));
List<Album> albumList = new ArrayList<>(albums.getData());

Connection<Photo> photos = fbc.fetchConnection("me/photos", Photo.class, MasterParameter.getParameterByClass(Photo.class),
Parameter.with("limit", 200));
Connection<Photo> photos = fbc.fetchConnection("me/photos", Photo.class, MasterParameter.getParameterByClass(Photo.class));
Album lonelyAlbum = new Album();
lonelyAlbum.setName("Einzelbilder");
lonelyAlbum.setDescription("Fotos ohne Album");
Expand Down Expand Up @@ -298,8 +296,7 @@ public static Map<SerializerKey, Object> albumInfo(Album album, FacebookClient f
if (fakeAlbum && fakePhotos != null) {
photosConn = fakePhotos;
} else {
photosConn = fcb.fetchConnection(album.getId() + "/photos", Photo.class, MasterParameter.getParameterByClass(Photo.class),
Parameter.with("limit", 200));
photosConn = fcb.fetchConnection(album.getId() + "/photos", Photo.class, MasterParameter.getParameterByClass(Photo.class));
}
if (progress != null) {
progress.progress("Fetching " + (album.getCount() != null && (maxPics > album.getCount()) ? album.getCount() : maxPics)
Expand Down

0 comments on commit a4fd00e

Please sign in to comment.