Question

i am doing some work for an iphone app that retrieves a bunch venues from a webservice, kinda like Yelp. They also want to be able to checkin to one such venue with Foursquare. Is it reasonable to demand that they also return a foursquare venue id, or do i have to look it up given a lat long? My concern is that even if i have a lat long, i dont necessarily know if the venue i looked up is the correct one. Do people just live with this uncertainty, or what? I should also elaborate that the UI is set up so that only one venue gets shown in the checkin UI. Maybe the solution is to provide multiple venues? Ideas? Opinions? Thanks!

Was it helpful?

Solution

If your other webservice offers Foursquare IDs, then getting them there will be your easiest solution. If not, you have two options:

  1. Foursquare provides a location service that you could use to retrieve a list of nearby venues (https://developer.foursquare.com/venues/). That would give you a list of names, categories, addresses, and foursquare ids.

    From there, you could search on your other webservice using name and address as needed and have the foursquare id straight from the source.

  2. You can pass the search endpoint (https://developer.foursquare.com/docs/venues/search.html) a location and query string, then iterate over the results to see if you received a direct match.

    This system is less precise than (1) (so, yes, you'll have to live with the uncertainty that a venue from your other service might not appear on foursquare, or might be at a slightly-incorrect location), but it will likely work in most situations.

OTHER TIPS

I deal with this for my startup. Unfortunately, there's no good solution.

I have a batch job that given the lat/long and name, it searches the Foursquare API for any venue with the same name & within 0.1 miles. More than 5 times out of 10, the name will be different or there will be multiple venues with the same name. We had to manually set the Foursquare Id.

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