我收到 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
指定一个月范围内的时间戳,这是一个问题吗?
附注使用 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 多天前并获得结果)
关于javascript - Ajax 调用 Instagram (GET/media/search) 时间戳问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21091543/