简体   繁体   English

Foursquare Venue API返回空的场地列表

[英]Foursquare Venue API returning empty venue list

I am working on the FourSquare venue API. 我正在研究FourSquare场所API。 The following API link was giving results until this morning at 3 AM: 直到今天凌晨3点,以下API链接才给出结果:

https://api.foursquare.com/v2/venues/search?ll=-6.21944223,106.80315059&intent=browse&radius=30&client_id=XXXX&client_secret=XXXX&v=20180512&m=foursquare https://api.foursquare.com/v2/venues/search?ll=-6.21944223,106.80315059&intent=browse&radius=30&client_id=XXXX&client_secret=XXXX&v=20180512&m=foursquare

but now there is an empty venue array with status code 200. There is no update on the developer website. 但是现在有一个空的场所阵列,状态码为200。开发者网站上没有更新。

Please help me understand why this is happening. 请帮助我了解为什么会这样。 Thanks in advance. 提前致谢。

I had a similar problem with my app. 我的应用程式有类似的问题。 Up until a couple of weeks ago we were able to make requests to the Foursquare api without specifying category ids. 直到几周前,我们无需指定类别ID即可向Foursquare api发出请求。 By doing this all place categories were considered. 通过这样做,所有场所类别都得到了考虑。 But now if you ommit categoryId no place is returned at all. 但是现在,如果您省略categoryId,则根本不会返回任何位置。 I don't know if this is a bug on the Foursquare api or just a feature change (a VERY BREAKING change). 我不知道这是Foursquare api上的bug还是仅仅是功能上的更改(一项非常重大的更改)。

While we don't know the real answer, try adding a "categoryId" to your request, such as: 虽然我们不知道真正的答案,但是请尝试在您的请求中添加“ categoryId”,例如:

https://api.foursquare.com/v2/venues/search?
    client_id={YOUR_CLIENT_ID}
    &client_secret={YOUR_CLIENT_SECRET}
    &v=20130815&ll={LATITUDE},{LONGITUDE}
    &limit=50
    &intent=browse
    &radius=50
    &categoryId=4d4b7104d754a06370d81259,4d4b7105d754a06372d81259

(the indentation on the URL above is just for legibility, you should pass this URL as a single line when doing your request) (上面URL上的缩进仅出于可读性考虑,您在执行请求时应将此URL作为一行传递)

Same thing happens to me. 我也一样 I've changed the API version (v) also without any 我也更改了API版本(v)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM