0

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.

mishik
  • 9,973
  • 9
  • 45
  • 67
Sam
  • 616
  • 7
  • 19

2 Answers2

1

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
Community
  • 1
  • 1
Alex Kara
  • 21
  • 3
0

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.

Yura Shinkarev
  • 5,134
  • 7
  • 34
  • 57