I m using the api @ api.foursquare.com/v2/users/USER_ID/checkins referenced here developer.foursquare.com/docs/users/checkins I am creating the request using vb.net but that s probably irrelevant. The issue I am having is that the response I receive seems to ignore the beforeTimeStamp value.
For example I have created a request url of this; (oauth_token masked – but is correct and works) https://api.foursquare.com/v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimestamp=1333238400 1332720000 is the Epoch date 26-03-2012 and 1333238400 is 01-04-2012 I would expect this to return all the checkins between those dates. However it always returns all checkins up to the most recent one, i.e. today 11/04/2012. I spent last night searching for answers to this and I am no further forward.
I could go ahead and write a paging method to move around the history log until I have just the ones I need. This would create multiple requests though.
I even wrote a simple function to strip out checkins that were out of range once I had the objects back. However this seems wasteful, especially as the application I am writing has the potential to go back years in a users history. This would mean returning way more data than required, creating an unneccesary overhead.
After all the searching I was just about resigned to doing one of the 2 workarounds above when I stumbled on the Foursquare API console at https://apigee.com/
If you have read this far, this is the main thrust of this question (unless anyone knows what I am doing wrong…)
If I create a request using the apigee.com interface with the settings above, the response body only contains the checkins I need, i.e. the ones between the specified dates! If I use my app, it returns them all!
My URL /v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimestamp=1333238400
Apigee’s URL (in the request box after execution)
/v2/users/self/checkins?oauth_token=####&v=20120214&limit=250&offset=0&afterTimestamp=1332720000&beforeTimeStamp=1333238400
Spot the difference? Neither can I! Anyone have any ideas? Many thanks