Skip to content Skip to sidebar Skip to footer

Ajax Call To Instagram (get /media/search) Timestamp Issue

I'm Getting 400 bad request as a response: {'meta':{'error_type':'APIInvalidParametersError','code':400,'error_message':'invalid parameters-check the max\/min-timestamps, if you su

Solution 1:

Just remove the last three 0s in your timestamp and it will work, I just tested this and it works

your timestamp is in miliseconds, it should be in seconds, you have to do time/1000.

https://api.instagram.com/v1/media/search?q=demonstration&lat=30.0444&lng=31.2357&distance=1000&min_timestamp=1383253200&max_timestamp=1385758800&access_token=9xxx4

Here is a implementation I have done for this API with timestamp change: http://www.gramfeed.com/instagram/map

(I dont think there is a 7 day limit, i can go back 30+ days before and get results)

Solution 2:

From the docs:

The time span must not exceed 7 days.

Don't forget that a Unix timestamp is seconds since the epoch. So in JS you'd do:

Math.round(newDate.getTime() / 1000 );

Post a Comment for "Ajax Call To Instagram (get /media/search) Timestamp Issue"