Simon Thomsen
Simon Thomsen

Reputation: 1421

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?

Upvotes: 0

Views: 623

Answers (1)

cpilko
cpilko

Reputation: 11852

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.

Upvotes: 2

Related Questions