Tankista
Tankista

Reputation: 1770

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

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

Upvotes: 0

Views: 1193

Answers (1)

chacham15
chacham15

Reputation: 14281

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

Upvotes: 1

Related Questions