Win Coder
Win Coder

Reputation: 6756

Getting only those Facebook events which haven't expired graph api

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"

Upvotes: 6

Views: 2272

Answers (2)

Zohaib Ijaz
Zohaib Ijaz

Reputation: 22895

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.

Upvotes: 4

Tobi
Tobi

Reputation: 31479

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

Upvotes: 12

Related Questions