开发者

Foursquare: check if a user visited a city

开发者 https://www.devze.com 2023-02-21 14:10 出处:网络
I was just wondering...Is it possible to check whether a specific user has checked in a specific city?

I was just wondering...Is it possible to check whether a specific user has checked in a specific city?

For example, if John has previously checked in at some restaurants in London and Paris, is it possible to tes开发者_C百科t from within my application if John has visited something in London or Paris?

Thanks!


Sure, within reason.

  • The user authenticates via OAuth2
  • You produce a number of recents to the checkin history https://developer.foursquare.com/docs/users/checkins.html - will probably need to use offset and limit to explore ALL of their check-ins
  • You will want to write an algorithm to figure out what 'city' means to you - perhaps X miles within the lat/long of the city center? For more detail, use a GeoCode API such as Google's or Bing's http://msdn.microsoft.com/en-us/library/ff701713.aspx
0

精彩评论

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

关注公众号