【问题标题】:Foursquare API for venue gives 301 error场地的 Foursquare API 给出 ​​301 错误
【发布时间】:2012-03-01 23:18:19
【问题描述】:

我正在使用 Foursquare API 来获取场地详细信息,同时通过它给我的 CURL 发出请求

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.8.52</center>
</body>
</html>

错误。 它以前工作得很好,也得到了结果,但现在它似乎不工作了。你能给我一些建议吗?

我的 api URL 是

https://api.foursquare.com/v2/multi?requests=/venues/172832,/venues/172832/tips&oauth_token=MyToken

提前致谢。

【问题讨论】:

    标签: foursquare


    【解决方案1】:

    301 不是错误代码。这是一个http状态码。您需要阅读 http 标头响应并获取您被重定向到的位置。

    【讨论】:

      【解决方案2】:

      使用我自己的身份验证令牌发出请求会返回有效结果——您确定在实际发出请求时您的 url 没有错字或损坏的元素吗?

      另外,请务必在您的请求中指定版本参数以避免将来损坏 (https://developer.foursquare.com/overview/versioning)

      【讨论】:

        猜你喜欢
        • 2014-04-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多