facebook fql query similar to friends checkins

感情迁移 提交于 2019-12-10 10:19:51

问题


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.



来源:https://stackoverflow.com/questions/6947647/facebook-fql-query-similar-to-friends-checkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!