6

I am trying to get only those facebook events that haven't expired yet(Upcoming events).

When i use the following query i get all the events including those that have expired long ago.

FBRequestConnection startWithGraphPath:@"/me/events"
                                     parameters:nil
                                     HTTPMethod:@"GET"
Win Coder
  • 6,628
  • 11
  • 54
  • 81

2 Answers2

12

You can make use of the since parameter as described in

if you set the timestamp to the current time, you should only see future events:

/me/events?since=1417508443
Tobi
  • 31,405
  • 8
  • 58
  • 90
4

You can use time_filter=enum{upcoming,past}. e.g. if you want upcoming events that have not expired yet, send a request like this

/page_name_or_id/events?time_filter=upcoming

In this way you don't have to handle timezone issues as with since=timestamp query.

Zohaib Ijaz
  • 21,926
  • 7
  • 38
  • 60