我正在使用 facebook4j 从 facebook 网页上的相册中获取照片,以便在我的网站上制作画廊。
但是,我一次不能获得超过 25 张照片(即使相册中有更多照片并且计数正确(album.getCount())。
我尝试使用 reading.limit() 但没有成功...是硬限制为 25 还是我做错了什么?
if(null != facebookAlbum) {
Reading reading = new Reading();
reading.limit(100);
ResponseList<Photo> photoResults = facebook.getAlbumPhotos(facebookAlbum.id, reading);
Iterator<Photo> photoItr = photoResults.iterator();
List<FacebookImage> facebookImages = new ArrayList<FacebookImage>();
while(photoItr.hasNext()) {
Photo photo = photoItr.next();
FacebookImage facebookImage = new FacebookImage();
facebookImage.imageUrl = photo.getSource().toString();
facebookImage.album = facebookAlbum;
facebookImages.add(facebookImage);
}
}