FQL - How to fetch latest photos of all my friends?

1.2k views Asked by At

I'm trying to fetch latest photos uploaded by all my friends within last 24 hours using Facebook FQL query:

SELECT pid, caption FROM photo WHERE aid IN 
   ( SELECT aid FROM album WHERE owner IN 
      ( SCV list of all my friends Ids ) 
   ) 
AND created > 1299341284 ORDER BY created DESC

1299341284 is 24hours back from time of writing this article

I get only few results (cca 20), not all photos. It seems like there is a limitation in number of statements in IN. I'm trying with 308 friends ids. If I put only few ids it works. Do you have any idea how to solve this in effective way? Probably using multi query? Any ideas?

Thanks

1

There are 1 answers

1
chacham15 On

Use SELECT uid2 FROM friend WHERE uid1=me() instead of the SCV list.