Sam
Sam

Reputation: 626

Facebook: How to get list of last friends checkins using graph API or FQL

The following Graph API gets the first checkin for each friend. How do you get the last checkin?

me/friends?fields=checkins.limit(1).fields(from,message,place.fields(id,name,location,likes,website,phone,description,checkins),tags)

Note that I can remove the limit but that is going to give me all the checkins which is not what I want.

Upvotes: 0

Views: 2124

Answers (2)

Alex Kara
Alex Kara

Reputation: 21

I think this will be helpfull: https://stackoverflow.com/a/7743148/775109

A graph Api request for that is the following

https://graph.facebook.com/me/friends?access_token=yourToken
&fields=checkins.limit(1)&format=json&offset=0

Upvotes: 1

Yura Shinkarev
Yura Shinkarev

Reputation: 5354

You can try use checkin api by FQL. I see only one way: use multi query in one request:

1) select post_id from checkin table from your friends (author_uid) order by timestamp (desc)

2) select page_id from location_post table, where posts from query (1)

3) get pages info from table page where page_id is set from (2)

As result, you get last checkins, but issue: this checkins don't grouped by friends. For example, you can get last (by date) checkins, that have one user.

Upvotes: 0

Related Questions