Jul 25, 2008 at 1:39 AM
Edited Jul 25, 2008 at 1:41 AM
I've been trying to figure out how to make a simple query with getEvents().. it retrieves every single event in my user's database, can i at least narrow it down to all events after now? Thats a huge load to take from a fairly slow server...
What I tried was:
DateTime start = DateTime.Now;
DateTime end = DateTime.Now.AddDays(3);
fbEventList = _fbService.GetEvents(f, userID, start, end);
where f is an empty list of strings, and userID is my user id.. This *should* return all the events for the next 3 days, but instead it returns an error telling me there was an unexpected "." in the fql..
The alternative, i have almost everything working fine just using directFQL except that the (double)start_time to datetime conversion seems to come out all wrong.. the function i built for it looks like this:
protected DateTime dateFromUnixEpoch(double secs)
DateTime unixEpoch = new DateTime(1970, 1, 1).AddHours(-3);
DateTime rtnTime = (unixEpoch.AddSeconds(secs)).AddHours(timezoneDbl);
the addhours(-3) was the only way that I could get the times to work here in toronto, but everywhere else in the world it shows up with an incorrect time.. Is there a time conversion tool already in place for facebook's .net implementtion? Or perhaps
a php time to .net time port?
btw, timezoneDbl is taken from another directFQL query thats from the user's info.
thanks muchly for any time you can put into lending me a hand.. this has been a frustrating experience and any help is appreciated.