I’m requesting a user’s checkins at the following endpoint: https://api.foursquare.com/v2/users/self/checkins
Items returned are ordered by “createdAt” date descending (more recent checkins first). When I filter the results by adding a “beforeTimestamp” query string parameter, though, the ordering is reversed.
An example:
https://api.foursquare.com/v2/users/self/checkins?beforeTimestamp=1348711278&limit=1
Expected result: the most recent checkin created before the given timestamp
Actual result: the first checkin ever created
Is this behavior by design? If so is there any way to specify the ordering/direction?
Thanks.
(I omitted the oauth_token and v query sting parameters)
You can now specify the sorting order of checkins in users/checkins. Use the parameter “sort”, with values “newestfirst” or “oldestfirst”.