Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google+ API : Get Profile's currentLocation

I'm currently building a test and trying to get a google+ user location. I'm testing on myself and have set my position to public.

I was originally planning to use Google Latitude, however, since Google is deprecating this API in a few days, my only option is to use the Google+ API.

The parameter currentLocation was added a few months ago

I'm therefore trying to get it. But could not manage to do it.

I've tested on my own server using the PHP API and then the JS API with Oauth2.0, but this damn parameter is never sent back. I can get any other parameter but definitely not that one.

Then I've tested in the google+ explorer, but same thing here, nothing came out

Does anyone have already encounter a similar issue ?

I have a few idea where it could come from :

  1. Does Oauth2.0 does not let me access this information (I've tried any possible data-scope)
  2. Is there just a bug on this functionality ?
  3. Is it restricted to verified users ?
  4. Or maybe it's just not possible ?

Thanks !

like image 294
littlebridge Avatar asked Jul 31 '13 15:07

littlebridge


1 Answers

Access to location data is restricted to users who have granted you access to their location data at the time that the OAuth token was generated.

You have to specifically request access to location data in the scope parameter.

like image 179
user3175273 Avatar answered Oct 06 '22 22:10

user3175273