5

I'm thinking about writing a perl script that will use the Google Latitude API to track a bunch of people doing a big bike ride.

The idea is that we all share location, then this script uses the API, logs in as me and polls google for everyone's position every 60 seconds or so.

But, I've just been looking over the Google Latitude API and it looks like I can only get and set my own location. Is that the case?

Kara
  • 6,115
  • 16
  • 50
  • 57
aidan
  • 9,310
  • 8
  • 68
  • 82

1 Answers1

9

Each of your users will need to authenticate using OAuth to your application. Once they have done that, you use the latitude API on each individual account to pull the necessary data. There is no way to get data on a user who has not individually allowed your application to access their data (that is, no way to poll your friends locations).

http://code.google.com/apis/latitude/faq.html#oauthaccess

Paul McMillan
  • 19,693
  • 9
  • 57
  • 71
  • ok, thanks for the clarification. It seems strange that they don't provide that data. – aidan Jul 01 '11 at 23:41
  • 2
    Not at all. It's a privacy thing. As a Latitude user, I may be willing to share my location with you, but I may not want to share my location with every bit of malware or advertising application you allow for your own account. Fundamentally, you can't share my data with a third party, which is as it should be. It is a bit limiting for developers though. – Paul McMillan Jul 01 '11 at 23:43
  • I don't follow; if google allows me to sit at a computer and write down all the locations for my friends with pen and paper, why won't it allow an app (logging in with my credentials) to do the same thing on my behalf? – aidan Jul 01 '11 at 23:46
  • 3
    Because writing that down with pen and paper takes a long time. It's significantly harder than clicking "yes, fertilize my farmville crops and while you're at it, share the locations of all my friends with your advertisers". – Paul McMillan Jul 02 '11 at 06:22