Reputation: 13
In my facebook page, when someone who's not the admin posts a photo, it goes into an album called "photos of me" that is different from other albums made by me. It has no 'aid'... its url is: http://www.facebook.com/photo.php?fbid=1760432628996&set=o.373236069382570&type=1&permPage=1
Photos are public, you can see them even if you're not registered on facebook.
I'm able to fetch photos in other albums of my page using this FQL:
SELECT pid, src, caption FROM photo WHERE aid = 'MY_ALBUM_ID' ORDER BY created DESC
But I can't fetch photos in "photos of me" album because there's not 'aid'. I tried to query the stream but I got only pictures I posted on my wall.
Could someone paste me the correct FQL to fetch photos on the album above?
Upvotes: 1
Views: 1336
Reputation: 11852
These are photos you've been tagged in, so they aren't your photos. That's why they don't show up in any of your albums.
This query gets them:
SELECT pid, object_id, src, caption FROM photo WHERE object_id IN
(SELECT object_id FROM photo_tag WHERE subject='373236069382570')
According to the developer reference, FB prefers object_id
to pid
now. You might want to work with object_ids to prevent breaking your code if FB deprecates pid
.
Upvotes: 0