Talk:Photos.getAlbums
From Facebook Developer Wiki
Contents |
[edit] BUG? photos.getAlbums doesn't return Profile Pictures album
Is this a bug? If an account has only one album, the profile pictures album, a call to getAlbums returns NO results. If you add another album, even an empty one, then a subsequent call to getAlbums returns 2 albums, profile pictures and the newly created album. The same thing happens if you an FQL query such as this: (SELECT aid, cover_pid, owner, name, description FROM album WHERE owner=(userid).
- Sounds like one. Could you please file one in Bugzilla? Thanks, Pete (563683308 13:55, 24 July 2009 (PDT))
- I am experiencing the same and cannot find a bug report to match this, so have filed one
- http://bugs.developers.facebook.com/show_bug.cgi?id=6409
- --1190307405 21:13, 20 August 2009 (PDT)
- Thanks for filing it, Richard! Pete (563683308 09:42, 21 August 2009 (PDT))
[edit] Short vs long of aids
This article should discuss the two different types of aid. One is a 32 bit quantity, that along with a 32 bit uid uniquely identifies an album. This is the aid that is used as an argument to photos.php, for example.
The *other* type of aid is the 64-bit variety, which is what getAlbums() expects. The 64-bit aid is a combination of the "short" aid, and the uid, shifted to the left 32 bits.
The only place I've found this documented is at:
http://wiki.developers.facebook.com/index.php/Profile_archive_album
But it should also be documented here and in the other API calls.
((shouldn't the last argument be "array - aids" indicating that it's a list of album IDs to fetch?))
[edit] FQL Equivalent
FQL Equivalent listed on this page "SELECT aid, cover_pid, owner, name, created, modified, description, location FROM album WHERE owner=uid AND aid IN (aids)" has a 602 error the last word aids should read aid. 1181029451 16:37, 28 October 2008 (PDT)
- FQL Equivalent does not return aid for pages but works fine for users. 1181029451 16:39, 28 October 2008 (PDT)
[edit] photos.getalbums doesn't work for FB pages
This API call photo.getalbums doesn't work for FB pages following the guideline to substitute the page_id for the uid. 1181029451 11:51, 29 October 2008 (PDT)
- It's a known issue that the photos.* calls don't work with Facebook Pages. See http://bugs.developers.facebook.com/show_bug.cgi?id=942. It's a non-trivial fix, and we don't have an ETA for fixing it at this time. Pete (563683308 18:13, 10 November 2008 (PST))
[edit] Pending-photo count?
The "size" returned for an album does not include the number of pending photos, but that number is important when calculating how many more images can be placed into the album. Is there a way to calculate the number of images that can still be uploaded to each album?
[edit] photos.getAlbums visible can be empty String ?
I'm using the AS3 Facebook library for reading in AlbumData for both the current session user and his/her friends.
The visible property acts normal when reading in the albums owned by the current session user, but when reading in AlbumData from friends the visible property appears to be an empty string...
In Charles it turns out it has an attribute: <visible xsi:nil="true" />
Is a different approach desired when reading in Friends' albums data? I'm not sure what to make of this...
- You can't use this call to return friends' albums. You need a session key to retrieve albums, and you have a session only for the current user, and not the user's friends. The friend would need to authorize your application before you can get a session key and get that user's albums. Pete -- 563683308 14:07, 20 November 2009 (PST)
- thanks for a very swift response Pete! However I can get the data I want, I can read in all photos for every single friend... The only thing I can't get is the visible property (which I'm trying to retrieve for privacy concerns...) Am I doing something illegal here, or is this a bug?
