Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph API / FQL Does not return all events for a page

Facebook Page: http://facebook.com/getwellgabby/events/ currently has 8 events on it. I can see them. Non-admins can see them and can join them.

However, when I make calls via the Graph API or FQL, only 4 future events are returned. Results can be seen here: http://getwellgabby.org/events?raw=1 (Scroll to bottom for raw response.)

FQL Query is:

  SELECT eid, name, start_time, end_time, location, venue, description 
        FROM event WHERE eid IN ( SELECT eid FROM event_member WHERE uid = 213367312037345 ) AND end_time > now()
        ORDER BY end_time asc

Inspecting individual event IDs returned via Graph API shows no difference between these events. However, when editing them via the front end, they display in different dialogs.

Two sample events follow. Both were created by the same page admin approx. 24 hours apart. The first event displays properly via an API/FQL call. The second does not. From the front end, the second event displays differently than the first.

Data below was returned using the FB Graph API Expplorer Tool using an Access Token with "create_event" privileges.

Reports Correctly:

{
  "id": "344143808978921", 
  "owner": {
    "name": "Get Well Gabby", 
    "category": "Non-profit organization", 
    "id": "213367312037345"
  }, 
  "name": "Get Well Gabby Day With The Reading Phillies", 
  "description": "Please join [truncated...]", 
  "start_time": "2012-06-10T13:30:00", 
  "end_time": "2012-06-10T16:30:00", 
  "location": "FirstEnergy Stadium", 
  "venue": {
    "street": "1900 Centre Ave.", 
    "city": "Reading", 
    "state": "Pennsylvania", 
    "country": "United States", 
    "latitude": 40.357, 
    "longitude": -75.91434, 
    "id": "223424611014786"
  }, 
  "privacy": "OPEN", 
  "updated_time": "2012-04-25T14:22:57+0000", 
  "type": "event"
}

Does not report correctly:

{
  "id": "128748077259225", 
  "owner": {
    "name": "Get Well Gabby", 
    "category": "Non-profit organization", 
    "id": "213367312037345"
  }, 
  "name": "Get Well Gabby Day With The Wilmington Blue Rocks", 
  "description": "Get Well Gabby Day With [truncated...]", 
  "start_time": "2012-07-29T13:35:00", 
  "end_time": "2012-07-29T16:35:00", 
  "timezone": "America/New_York", 
  "location": "Frawley Stadium", 
  "venue": {
    "id": "148306638522325"
  }, 
  "privacy": "OPEN", 
  "updated_time": "2012-04-25T18:11:35+0000", 
  "type": "event"
}

Note, front end dialog for the event that does not report correctly will not accept additional venue information.

like image 544
cpilko Avatar asked Apr 26 '12 15:04

cpilko


2 Answers

You can use since and until to increase the scope of your query.

here is an example using graph api explorer and search events (shows future events) https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=search%3Ftype%3Devent%26q%3Da%26limit%3D100%26since%3Dnow%26until%3Dnext%20year


171535666239724/events?since=2010&until=now // all events since 2010 until now

171535666239724/events?since=now&until=2013 // all events from now until 2013

for graph api requests: until, since (a unix timestamp or any date accepted by strtotime http://php.net/manual/en/function.strtotime.php): https://graph.facebook.com/search?until=yesterday&q=orange

like image 105
ShawnDaGeek Avatar answered Nov 16 '22 09:11

ShawnDaGeek


The issue seems to have resolved itself for now. Thanks if someone following this issue did something at Facebook.

like image 30
cpilko Avatar answered Nov 16 '22 10:11

cpilko