Facebook Graph API获取纬度和经度的所有事件 [英] Facebook Graph API Get All Events For Latitude and Longitude

查看:103
本文介绍了Facebook Graph API获取纬度和经度的所有事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取给定位置的所有公开活动。这是我现在正在使用的

I'm trying to get All public events for given location. Here is what I'm using now

SELECT+name,+pic_cover,start_time,+end_time,+location,+description,venue++FROM+event+WHERE+eid++in(SELECT+eid+FROM+event_member+WHERE+uid+IN+(SELECT+page_id+FROM+place+WHERE+distance(latitude,+longitude,+"40.1811",+"44.5136")+<+50000+limit+0,15000))+ORDER+BY+start_time+desc+limit+0,1500

但是,与该FQL查询没有返回的那个位置的事件数量很大。
有没有机会获得给定位置的所有活动,或者可能是由City?

我使用的是Python,但如果您有一些示例代码任何语言请写出来。

But there are huge count of events with that location which didn't returning with that FQL query. Is there any chance to get all events for given location or it may be by City ?
I'm using Python , but if you have some example code on any language please write it out.

推荐答案

我想如果你省略了 event_member 表,你最终会得到更多的结果。请考虑结果只包括由页面本身创建的事件,而不是由个人用户创建的事件。

I think if you omit the subquery for the event_member table, you'll eventually get more results. Please consider that the results will only include Events created by the Page itself, not those created by individual users.

SELECT name, pic_cover,start_time, end_time, location, description,venue FROM event WHERE creator IN (SELECT page_id FROM place WHERE distance(latitude, longitude, "40.1811", "44.5136") < 50000 limit 0,15000) and start_time > now() ORDER BY start_time desc limit 0,1500 

如果您有一个感兴趣的场所列表,你可以使用我在这里描述的方法: Facebook FQL查找在某个地点发生的所有活动

If you have a list of venues of interest, you could use the method I described here: Facebook FQL find all events that take place at a certain venue

编辑:

由于现在不可能使用FQL,如果应用程序是在2014-04-30之后创建的,那么直接搜索就不可能了。要实现这一点,必须采用三步法,如 https:// github.com/tobilg/facebook-events-by-location 例如。

As it is now impossible to use FQL if the app was created after 2014-04-30, a direct search is no longer possible. To achieve that, a three-step approach must be used, as implemented in https://github.com/tobilg/facebook-events-by-location for example.

这篇关于Facebook Graph API获取纬度和经度的所有事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆