简体   繁体   中英

How to get the user's own location on a Foursquare checkin from the API?

I'd like to know if the Foursquare API allows you to get at the user's own location during a checkin, rather than the location of the venue itself. For most venues the difference is negligible, but if someone's checked into, say, Yosemite National Park, their actual location may vary wildly. I'd like to know where they were when they checked in.

The API's Checkin endpoint has two relevant attributes: venue and location . The location information within venue is (obviously) relevant only to that venue (where the venue is located). In most cases, this appears to be the only location information included. The location attribute is only included for venueless checkins, but otherwise includes the user's own location. It seems to me the latter should always be available, even if a venue is specified.

Am I missing something? Is there a (different) way to get at the user's own location via the API for a regular checkin?

You cannot retrieve a user's physical lat/lng for a check-in. It's not exposed anywhere in the API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM