Ajax调用Instagram(GET /媒体/搜索)时间戳问题

作为回应,我收到400 bad request

 {"meta":{"error_type":"APIInvalidParametersError","code":400,"error_message":"invalid parameters-check the max\/min-timestamps, if you supplied them"}} 

虽然我的要求似乎很好:

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

指定一个月范围的时间戳,这是一个问题吗?

PS使用JQuery 1.9.1

谢谢,

只需删除时间戳中的最后三个0,它就会起作用,我只测试了它并且它可以工作

你的时间戳是以毫秒计,它应该是几秒钟,你必须做时间/ 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 

以下是我为此API所做的实现时间戳更改: http : //www.gramfeed.com/instagram/map

(我不认为有7天的限制,我可以回到30多天前获得结果)

来自文档 :

时间跨度不得超过7天。

不要忘记Unix时间戳是自纪元以来的秒数 。 所以在JS中你会这样做:

 Math.round(new Date.getTime() / 1000 );