views:

15

answers:

1

Hi there,

i have a bunch of facebook post's, Any ideas how to get the one with the most comments as fast as possible?

thanks for helping

A: 

Using FQL:

select post_id, comments.count from stream where post_id in("post_id1", ... , "post_idX") order by comments.count desc limit 1
serg
That was my first idea as well. Do you think this will work with 10.000? 50.000? posts as well?
fabian
@fabian might not work. Facebook often doesn't like numbers over 5,000, in this case you would need to manually split your big list to chunks of 5k.
serg

related questions