0

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

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Tankista
  • 1,685
  • 17
  • 26

1 Answers1

1

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

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
chacham15
  • 13,719
  • 26
  • 104
  • 207
  • also check here: http://stackoverflow.com/questions/12956181/getting-latest-photos-from-friends-not-working – jclova Apr 09 '13 at 19:06