How to order results for Facebook Graph API?

I have been playing around the Facebook Graph API for some time .

I am trying to get a list of friends using https://graph.facebook.com/me/friends.

While it is working fine, the results are sorted by identifier. Is there a way to get them to order by name, or do I need to reorder them manually through my application level?

Thank!

+5
source share
1 answer

I don’t think there is a way to organize the results of the Graph API, but you can order the FQL results. Sort of:

SELECT name, uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = $current_user_id) ORDER BY name
+4
source

All Articles