简体   繁体   English

Facebook Graph API:从场所获取公共事件(无FQL)

[英]Facebook Graph API: Get public events from venue (without FQL)

I use the graph api with FQL with the query below (PHP) 我将图API与FQL一起用于以下查询(PHP)

$graph_url= 'https://graph.facebook.com/fql?q='.urlencode(
'SELECT
creator,eid,location,pic_cover,name,description,start_time,end_time,
location,ticket_uri,venue FROM event 
WHERE eid IN 
   (SELECT eid FROM event 
     WHERE contains("'.$name.'") and creator = '.$venue_id.' )
     AND start_time >= now() 
     ORDER BY start_time 
     ASC').
'&access_token='.$access_token.'';

The query above returns all events from a given venue id / name. 上面的查询返回给定场地ID /名称的所有事件。 This works perfect for me. 这对我来说很完美。 However, I read that FQL is deprecated. 但是,我读到FQL已过时。 I read the API documentation but I'm clueless how I can 'replicate' this query to a valid Graph API query.(without FQL) 我阅读了API文档,但是我不知道如何将该查询“复制”到有效的Graph API查询。(无FQL)

Can someone point me in the right direction? 有人可以指出我正确的方向吗?

解决了,实际上很简单。

$graph_url= 'https://graph.facebook.com/'.$venue_id.'/events?fields=id,cover,name,description,start_time,end_time,location,ticket_uri,venue&limit=1000&since='.$date.'&access_token='.$access_token.'';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM