问题描述
我得到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
指定一个月范围内的时间戳,这是一个问题吗?
specifying timestamps with a range of a month, is that an issue?
P.S.使用JQuery 1.9.1
P.S. Using JQuery 1.9.1
谢谢
推荐答案
只需删除时间戳记中的最后三个0,它就会起作用,我刚刚对此进行了测试
Just remove the last three 0s in your timestamp and it will work, I just tested this and it works
您的时间戳以毫秒为单位,应该以秒为单位,您必须执行time/1000.
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
这是我为该API完成的带有时间戳更改的实现: http://www.gramfeed. com/instagram/map
Here is a implementation I have done for this API with timestamp change: http://www.gramfeed.com/instagram/map
(我认为没有7天的限制,我可以提前30天以上返回结果)
(I dont think there is a 7 day limit, i can go back 30+ days before and get results)
这篇关于Ajax调用Instagram(GET/media/search)时间戳问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!