Using the graph api it's possible to do:
https://graph.facebook.com/me/checkins
But how am I supposed to do it with FQL? I tried this which suggests:
SELECT message FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND me() IN tagged_uids
but it doesn't return even a single result.
Thanks.
From what I can see, IN
doesn't seem to work with me()
. You have to first get the user id and assign this to a variable. This throws an OAuth exception:
SELECT message FROM checkin WHERE author_uid = me() OR me() IN tagged_ids
but if you set [UserId]
to the current user's id, this works:
SELECT message FROM checkin WHERE author_uid = [UserId] OR [UserId] IN tagged_ids
You don't need to use the friend
subquery. FQL will only return checkins that are visible to your user.
For this to work, make sure your access_token
has both the user_checkins
and friends_checkins
permissions.