facebook fql query similar to friends checkins

2019-05-10 12:12发布

问题:

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:

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.