如何找到朋友的过去签到附近的地点? [英] how to find friend's past checkins near a location?
问题描述
感谢您的帮助!
Doles
虽然初步答案对我而言是为了我的目的,但很快就变得不足够了。现在,我的头撞在墙上,终于破了(不是我的头 - 墙)。这里有两个更好的方式来找到我需要的东西:
这是找到只是签入:
SELECT checkin_id,coords,tagged_uids,page_id FROM checkin WHERE
(author_uid IN(SELECT uid2 FROM friend WHERE uid1 = me())或
author_uid = me())和coords.latitude< '45 .0'和coords.latitude> '29'
和coords.longitude>' - 175'和coords.longitude<' - 5';
这是找到所有位置的帖子:
SELECT id,page_id FROM location_post WHERE(author_uid IN(SELECT
uid2 FROM friend WHERE uid1 = me())或author_uid = me())和
coords.latitude< '45 .0'和coords.latitude> '29'和
coords .longitude>' - 175'和coords.longitude<' - 5'
In my app, a user is at a location and is looking for her friends who have been anywhere withing 10 miles of where she is. How do I find this with either FQL or graph? The only way that I can see is by running a search like so: https://graph.facebook.com/search?type=checkin and then running through the results to find out which location was within 10 miles. Is there a better way for this?
Thanks for your help!
Doles
Although the initial answer did work for me for part of my purpose, it quickly became inadequate. Now, after banging my head against the wall, it finally broke (not my head - the wall). Here are two more BETTER ways that WORK to find what I need:
This is to find just checkins:
SELECT checkin_id, coords, tagged_uids, page_id FROM checkin WHERE (author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) or author_uid=me()) and coords.latitude<'45.0' and coords.latitude>'29' and coords.longitude>'-175' and coords.longitude<'-5';
This is to find all location posts:
SELECT id, page_id FROM location_post WHERE (author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) or author_uid=me()) and coords.latitude<'45.0' and coords.latitude>'29' and coords.longitude>'-175' and coords.longitude<'-5'
这篇关于如何找到朋友的过去签到附近的地点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!