转换Facebook新搜索到图形或FQL



我想转换这个请求

  • https://www.facebook.com/search/110970792260960/events-near/

到我可以与Facebook SDK一起使用的请求,例如:

  • https://graph.facebook.com/fql?access_token=X& q =选择……

  • 搜索?类型= event&中心= Y&距离= Z

我已经尝试过这样的FQL,不幸的是,这个查询只返回事件相关的页面。我已经尝试过滤纬度和经度从会场事件的结构,但再次我需要指定?q=参数,减少我的结果。

对于第二个选项,我不能,因为参数中心和距离不能与type=event

FQL已被弃用,只能在旧的应用程序中使用,但你可以使用Graph API的搜索端点来搜索事件:https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search

我想这并不允许你搜索特定区域的事件。这在API中是不可能的

正如@luschn所说,FQL已弃用,可以使用到2016年8月。理论上有这样一种查询Page Events的方法:

select 
    eid, 
    name, 
    description, 
    location, 
    all_members_count, 
    attending_count, 
    unsure_count, 
    not_replied_count, 
    declined_count, 
    start_time, 
    end_time,
    venue 
from 
    event 
where     
    creator in (
        select 
            page_id 
        from 
            place 
        where 
            distance(latitude, longitude, "37.76", "-122.427") < 1000
    ) 
and 
    start_time > "2015-05-22"

这只包括那些由Page本身创建的事件,如果Page有一个存储的地址。你不能得到用户创建的事件,因为你不能访问他们的location字段。

相关内容

最新更新