Created By
Vlad Shyshov
10/20/2012 1:04pm

Subscribers (3)

BugsFQL query sorting does not work for users with a lot of photos

  • Status: Triaged
  • Priority: Medium
  • Updated: October 22, 2012 at 10:26am
Latest response from Facebook
Sean Quinlan
Thanks for the report. We will follow up.
Status changed to Triaged · Priority changed to Medium · October 22, 2012 at 10:26am
My app needs to retrieve user photos sorted by the number of likes. I ran this query:
"SELECT object_id, src_big, src_big_width, src_big_height, link, like_info, caption, created FROM photo WHERE owner = USER_ID_HERE ORDER BY like_info DESC LIMIT 3"
This query returns an error when I run it for any user who is my friend and my app user has over 3,000 photos (the list of those users could be provided by additional request).
I ran variants of this query in graph API explorer and it starts working only when i remove "ORDER BY like_info DESC" :
"SELECT object_id, src_big, src_big_width, src_big_height, link, like_info, caption, created FROM photo WHERE owner = USER_ID_HERE LIMIT 3" - this works"

Please help resolve this issue because there is no other way to get all pictures via FB API and this is a core functionality of my app.
2 people can reproduce this issue by following these steps
Repro