I’m using a fairly simple FQL-query to query all the events by a page.
SELECT
eid, name, pic_big, start_time, end_time, location, description
, creator, host, venue
FROM
event
WHERE
eid IN ( SELECT eid FROM event_member WHERE uid = {$uid} )
ORDER BY start_time asc
In the time facebook stored it’s start_time and end_time in timestamps it was simple to get only future events: ... AND end_time >= {$now} ...
But facebook changed it’s fields in timezone format.
Is there an easy way, preferably in fql, to only show the future events?
Unless I’m misunderstanding your problem, I just tried this out on the Facebook Graph API & FQL Explorer and it appeared to work.
The only changes I made to your query was to replace
{$uid}and{$now}withme()andnow()respectively. The following query returned only future events for my account:You can view this in action at: Facebook Graph API Explorer Example
And of course be sure you provide the Explorer with a valid access token for your account.