Facebook FQL:在范围内签到
有没有办法使用 FQL 来选择在指定位置范围内的所有好友签到?我可以使用 FQL 返回我的朋友签入坐标:
https://api.facebook.com/method/fql.query?access_token={0}&query=SELECT coords FROM checkin WHEREauthor_uid IN (SELECT uid2 FROM朋友 WHERE uid1 = me())
但是我如何添加到上面的查询中以执行类似...
哪里坐标 [(纽约市,纽约) | 10 英里以内(长、纬度)| (user.current_location)]
任何帮助将不胜感激。提前致谢。
编辑(美国东部时间 3 月 9 日下午 3:05):
我主要只是在寻找最终结果 - 不需要在单个 FQL 语句中返回所有内容,甚至不需要使用 FQL(图形 api可能吗?)我知道,由于 FQL/图形 API 的限制,我可能需要将其分块带回数据并在本地使用它。我只是想以高效的方式完成此操作,这样用户就不必等待 20 秒来加载所有内容。
迫在眉睫的问题是,如果某人有数百个朋友,并且返回每个朋友的所有签到,则数据量太大,无法处理。
我正在寻找的结果的详细信息是从我所有的朋友开始,最后是他们在过去 X 天内签到的前 10 个地点(基于签到位置 ID 的最高频率),即用户当前 Facebook 位置的 Y 距离,以及该位置的页面属于某个类别(例如酒吧)的位置。
这就是我正在处理的情况,我希望我附加的附加信息不会使我原来的问题复杂化。谢谢!
Is there a way to use FQL to select all my friends Checkins that are in range of a specified location? I can use FQL to return my friends checkin coords:
https://api.facebook.com/method/fql.query?access_token={0}&query=SELECT coords FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
but how can I add to the above query to do something like...
Where coords Within 10 miles of [(New York City, NY) | (long, lat) | (user.current_location)]
Any help would be greatly appreciated. Thanks in advance.
EDIT (3/9 3:05pm est):
I'm mainly just looking for an end result - doesn't need to get everything back in a single FQL statement, or even use FQL (graph api, possibly?) I understand I may need to bring it back data back in pieces and work with it locally due to the limitations of FQL/the graph api. I just want to do it in an efficient manner so a user doesn't have to wait 20secs for everything to load.
The immediate problem is that if someone has several hundred friends and all checkins for each friend are returned, that's too much data to work with.
The granular details of the result I'm looking for is to start with all my friends, and end up with the top 10 places (based of highest frequency of the checkin's location ID) they checked into within the last X days, that are within Y distance of the users current facebook location, and where the location's page falls into a certain category, like a bar.
That's the scenario I'm dealing with and I hope the additional information I appended doesn't complicate my original question. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,有一些名为 distance() 的未记录函数可能会对您有所帮助,尽管它效果不太好(特别是因为它的半径限制为 50 公里):
最大值为 50,000 米,这是 的输出单位FQL 的(显然未记录)
distance
函数。https://developers.facebook.com/docs/reference/fql/checkin/
https://developers.facebook.com/docs/reference/fql/place
So there's some undocumented function called distance() that might help you, although it doesn't work so well (especially since it's limited to 50km radius):
Max is 50,000 meters, which is the output unit of FQL's (apparently undocumented)
distance
function.https://developers.facebook.com/docs/reference/fql/checkin/
https://developers.facebook.com/docs/reference/fql/place