Question

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 !

Was it helpful?

Solution 3

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.

OTHER TIPS

There's a breaking change for checkins in the July release https://developers.facebook.com/roadmap/ it mentions renaming page_id to target_id so this might be what's causing it. However the following fql query might be a starting point for you

   select author_uid from checkin where target_id = 110774245616525

author_uid should be the person who checked in https://developers.facebook.com/docs/reference/fql/checkin

I got the following fql to work to display all the names of my friends who have checked in at a specific location. Only tried it in Graph API Explorer, and it was fairly slow :/ Let me know if it's helpful :)
Select name from user where uid in (Select author_uid from checkin where author_uid in (select uid2 from friend where uid1=me()) and target_id=110774245616525)

An additional note: I noticed that many of my friends show up in the "Friends who have visited Paris, France" box, but they don't have any actual checkins there. I think that the box also checks to see if your friends have any photos from paris.. Just a thought

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top