facebook fql query similar to friends checkins

2019-05-10 11:56发布

Looking for the fql equivalente to the search below. Looking to get all checkins by friends and the name of the place.

https://graph.facebook.com/search?type=checkin&access_token=...

EDIT

temp_time = 2 weeks ago

If below, gets me the the page ID(place) and Author ID (user) of checkins

SELECT author_uid, page_id FROM checkin WHERE timestamp > #{temp_time} AND author_uid IN(SELECT uid2 FROM friend WHERE uid1=me())

What would be the sql or fql statement to include the user name and place details with the response. Ideally, would be user with the place detail in it.

1条回答
SAY GOODBYE
2楼-- · 2019-05-10 12:25

Assuming the name of the location is the same as it's respective page:

SELECT checkin_id, author_uid, page_id FROM checkin 
WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) 
AND page_id IN (SELECT page_id FROM page WHERE name = 'PAGE NAME')

FQL only permits one table within the FROM clause, as such, I don't think it is possible to get all the data you want from a single FQL statement because you would require data from both user and page tables.

查看更多
登录 后发表回答