Convert Facebook New Search to Graph or FQL

I want to convert this request

  • https://www.facebook.com/search/110970792260960/events-near/
  • to a request that I can use with Facebook SDK, for example:

  • https://graph.facebook.com/fql?access_token=X&q=SELECT ....
  • or

  • search?type=event&center=Y&distance=Z
  • I've tried a FQL like this, unfortunately this query only return events WITH pages associated. I've tried filter the latitude and longitude from venue struct of Event but again I need to specify the ?q= parameter which reduces my results.

    For the second option I can't because parameters center and distance doesn't work with type=event .


    FQL is deprecated and can only be used in older Apps, but you can use the search endpoint of the Graph API to search for events: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search

    Afaik this does NOT allow you to search for events in a specific area though. That´s just not possible with the API.


    As @luschn said, FQL is deprecated and can be used until August 2016. There by theory a way to query for Page Events like this:

    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"
    

    This only would include those events which have been created by a Page itself, and if the Page has an address stored. You can't get those Events created by Users, because you can't access their location field.

    链接地址: http://www.djcxy.com/p/32584.html

    上一篇: Facebook访问令牌页面

    下一篇: 将Facebook新搜索转换为图表或FQL