【问题标题】:testing foursquare API at the localhost在 localhost 测试foursquare API
【发布时间】:2012-09-07 10:15:03
【问题描述】:

我在 localhost 测试foursquare API

在foursquare developer的配置中,我将应用的url设置为

下载/欢迎页面网址 http://localhost 您的隐私政策网址 http://localhost/ 回调地址 http://localhost/app

我的应用程序 url 是 http://localhost/app,想法很简单,使用 HTML5 geo API 获取我的地理位置,并使用此地理数据从foursquare API 获取附近的地点。

但是,当页面在 auth 处重定向foursquare时,被重定向的页面说出现问题。

我猜是因为回调 url,有人可以告诉我如何在 localhost 设置正确的配置。

【问题讨论】:

    标签: api foursquare


    【解决方案1】:

    我遇到了这个问题。似乎在授权时,4SQ API 期望发送 redirect_uri 并匹配 APP 设置中的内容。所以基本上,在创建 Auth URL 时,您应该发送 client_id、response_type 和 redirect_uri。您为 redirect_uri 输入的值必须与您在 APP 设置中输入的值相匹配,在您的情况下为“http://localhost/app”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-27
      • 2020-07-11
      • 2012-05-17
      • 2013-09-06
      • 1970-01-01
      • 2023-03-25
      • 1970-01-01
      相关资源
      最近更新 更多