开发者

foursquare - get generic user location

I am trying to get the "generic location" of a location through foursqaure.

For example - for a specific geolong, geolat pr开发者_JAVA百科ovided to Foursquare API - is there an API/algorithm I can use, in order to determine if user is at home/mall/suburbs/city (generic locations)?

I could process the location type and determine this, but i was wondering if there is an easier way out there?


Since the vast majority of foursquare venues have one or more categories, you could use those to help you identify where a user is. If you have an oauth token for a user, you can access their check-in history through this endpoint: https://developer.foursquare.com/docs/users/users.html. You'll then see on their most recent check-in a list of categories, like "home," "bar," "nightlife," "movie theatre," that you can use to get an idea of what class of place they are at.

The database actually has very few issues with misspellings, duplicates, or false positives, but you will find some issues with miscategorized homes (many college dorms, for example, classify themselves as nightclubs or strip clubs as jokes). For a majority of locations, however, the results should be useful.


Have you considered GeoNames API for searching Wikipedia by location? Details here.

Using Foursquare's API is a pretty clever idea, but based on prior experiences, you may get some false positives due to mis-spellings and/or duplicate listings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜