Facebook fql wrong sort ORDER BY

I have this fql query:

  SELECT link_id, owner, owner_comment, created_time, title, summary, url, image_urls FROM link WHERE owner IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY created_time DESC LIMIT 0,200; 

It should display the last 200 published links by my friends, but it displays them sorted by owner id ASC and then created_time DESC .

Is ORDER BY in fql limited to one use? How can I make it work?

+4
source share
1 answer

I suspect the problem is the LIMIT statement. FQL has some odd internal behaviors to optimize its own internal API.

Try deleting the LIMIT statement and just specify it AND created_time > <point in time> and check if it is ordered correctly. If so, why.

+3
source

Source: https://habr.com/ru/post/1346971/


All Articles