Facebook: FQL get all checkins me() is tagged in

邮差的信 提交于 2019-12-11 07:35:27

问题


I want to get all the checkins a user is tagged in (note: I am not interested in his own checkins). I tried the following, which is a little illogical and of course does not work, but you'll get what I am trying to do:

SELECT message FROM checkin WHERE tagged_uids IN 
(SELECT uid FROM user WHERE uid = me())

Any ideas?


回答1:


You're thinking of IN backwards. The query you're looking for is:

SELECT message FROM checkin WHERE me() IN tagged_uids

However, tagged_uids is not indexable, so you'll need to know more information before you can run this query (like who is actually recording the checkin). One thing you could try is:

SELECT message FROM checkin 
WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) 
    AND me() IN tagged_uids

This will find all checkins in which your user is tagged that are by friends of the user (probably the only people who can check in that user anyway).



来源:https://stackoverflow.com/questions/6861930/facebook-fql-get-all-checkins-me-is-tagged-in

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