Question

I'm trying to get one good photo result on the Foursquare API which are representative of a venue.

Currently I'm using:

https://api.foursquare.com/v2/venues/VENUE_ID/photos?group=venue&limit=1

This works, but it appears that the photo filtered is always the most recently added photo for that venue, which is not necessarily always the best. There also doesn't seem to be anyway to any sort differently (by rating etc.). I would prefer that the photo that appears be always the first photo result on the foursquare website for the venue, whatever that may be.

I was playing around with the suffix, and I found that if instead of

photos?group=venue&limit=1

I just put

photos?&limit=1

I would get the results I am looking for (the first photo that appears on the website for that venue). However, on the documentation it says that having a group value is required. Obviously, I don't want to set behavior based on a bug, but it works.

So, is it a bug? Or is it just a problem with the documentation that says group is required. Any help would be appreciated.

Thanks!

Was it helpful?

Solution

That's probably a bug you're encountering, but to get the first photo on the venue page, you can query the venues detail endpoint and then use the photo object in the venue result: https://developer.foursquare.com/docs/explore#req=venues/40a55d80f964a52020f31ee3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top