Foursquare场地照片API仅偶尔与client_id/client_secret一起使用? [英] Foursquare venue photos API only occasionally working with client_id/client_secret?

查看:142
本文介绍了Foursquare场地照片API仅偶尔与client_id/client_secret一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现某些场所仅在使用登录用户而不是client_id/client_secret的情况下才会返回照片.这是故意的吗?

I've found that some venues will only return photos if I use a signed in user instead of a client_id / client_secret. Is this intentional?

curl -i https://api.foursquare.com/v2 /venues/4c36476d93db0f47f6cc1d92/photos?client_id = xxx \& client_secret = xxx \& group = venue \& v = 20120304

curl -i https://api.foursquare.com/v2/venues/4c36476d93db0f47f6cc1d92/photos?client_id=xxx\&client_secret=xxx\&group=venue\&v=20120304

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, private, no-store
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Mar 2012 00:28:34 GMT
Expires: Mon, 5 Mar 2012 00:28:34 GMT
Pragma: no-cache
Server: nginx/0.8.52
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
Content-Length: 66
Connection: keep-alive

{"meta":{"code":200},"response":{"photos":{"count":0,"items":[]}}}

curl -i https://api.foursquare.com/v2 /venues/4c36476d93db0f47f6cc1d92/photos?group = venue \& v = 20120304 \& oauth_token = xxx \& v = 20120304

curl -i https://api.foursquare.com/v2/venues/4c36476d93db0f47f6cc1d92/photos?group=venue\&v=20120304\&oauth_token=xxx\&v=20120304

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, private, no-store
Content-Type: application/json; charset=utf-8
Date: Mon, 05 Mar 2012 00:29:19 GMT
Expires: Mon, 5 Mar 2012 00:29:19 GMT
Pragma: no-cache
Server: nginx/0.8.52
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 1000
Content-Length: 15311
Connection: keep-alive

{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0}}],"response":{"photos":{"count":14,"items":[lots of images here]}}}

我想获取照片以与给定的位置相关联,作为背景处理,而不是与特定用户绑定.是否打算仅针对已登录的用户正常使用此API?

I want to fetch a photo to associate with a given place as a background process, not tied to the specific user. Is it intended that this API only functions correctly for signed in users?

推荐答案

无用户访问/venues/photos似乎存在一个错误.团队正在调查中.预期的行为是对该端点的无用户访问会返回该场所附加的所有公共照片.

Looks like there's a bug in userless access to /venues/photos. The team is investigating. The intended behavior is that userless access of that endpoint returns all public photos attached to that venue.

这篇关于Foursquare场地照片API仅偶尔与client_id/client_secret一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆