简体   繁体   中英

How to get recently added friends with facebook api

I'm searching for a solution where I can get last 10 added friends for a user. Is it possible to do via. the FQL or Graph API or something that isn't possible?

The friends table/endpoint does not expose the time that you and another user started your friendship. So you can't get this information directly.

The best you can do is query the stream table for friend announcements.

SELECT description, description_tags, created_time FROM stream WHERE source_id = me() 
  AND type = 8 LIMIT 100

In my case, this query returned 3 results, even though I requested a LIMIT of 100.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM