Search code examples
facebookfacebook-graph-apifacebook-checkins

Getting friends' facebook check-ins into a place


I'm trying to find which of my friends have been to Paris before. I'm trying to use the Graph API to do this.

So basically there's the place id (for Paris it's 110774245616525), I can get basic informations using the endpoint https://graph.facebook.com/110774245616525/ to do this. Then, I'm getting an access_token with friends_status and user_status permissions (using the Graph Explorer) and I'm using this access token to get the checkins. So I'm doing a GET https://graph.facebook.com/110774245616525/checkins?access_token=my_access_token call and all I get is this error message :

page_id is not a member of the checkin table

Although, reading the documentation I see the connection with checkins :

Checkins made to this Place Page by the current user, and friends of the current user.

Is this an error with the Graph API or with the way I do it?

Thanks !


Solution

  • With the help of asifrc and TommyBs I found a way to do this in FQL using this query :

    SELECT name 
      FROM user 
     WHERE uid IN (
           SELECT author_uid 
             FROM location_post 
            WHERE distance(latitude, longitude, "48.856614", "2.3522219") < 5000 
              AND author_uid IN (SELECT uid2 FROM friend WHERE uid1=me()))
    

    It's pretty much getting all my friends, searching all their posts close to the center of Paris, then getting their names.

    If anyone knows how to do this in Graph API, please let me know, because it's still not a good idea to rely on FQL, I think.