Closed GoogleCodeExporter closed 8 years ago
Hello,
I've just tested your script on my localhost with WAMP. My result is that I've
been redirected to this page :
https://www.google.com/latitude/b/0/apps?latitudeAuthResponse=INVALID_REQUEST_PA
RAMS
Do I have to specify an ApiKey or something ?
Original comment by jgarnie...@gmail.com
on 28 Apr 2011 at 10:40
My knowledge of this is pretty minimal (I've learned just enough to do what I
need to do...) but my understanding is you need to authorise the request with
an OAuth access token. Your code structure differs from mine, but maybe you'll
get the idea?
if(!$accessToken=unserialize(file_get_contents('/home/lee/latitude/token.txt')))
die('Unable to read access token.');
$client = $accessToken->getHttpClient($oauthOptions);
My token is stored in a text file, that is then read each time the script runs
to pull location data.
Original comment by lee.smal...@gmail.com
on 28 Apr 2011 at 5:36
I am having the same problem :
https://www.google.com/latitude/b/0/apps?latitudeAuthResponse=INVALID_REQUEST_PA
RAMS
Original comment by 50Pix....@gmail.com
on 17 Jun 2011 at 1:52
Is your token authorised to use 'best' ? There are 2 request types, city and
best. Your token needs to have the right authority.
Original comment by lee.smal...@gmail.com
on 17 Jun 2011 at 4:29
Now after I'm authorized and redirected back to my site I get the following :
Fatal error: Uncaught exception 'apiCacheException' with message 'Cache file
could not be deleted' in
/var/www/sites/web2era/public_html/googleapi/src/cache/apiFileCache.php:132
Stack trace: #0
/var/www/sites/web2era/public_html/googleapi/src/auth/apiOAuth.php(76):
apiFileCache->delete('OAuth:anonymous...') #1
/var/www/sites/web2era/public_html/googleapi/src/apiClient.php(130):
apiOAuth->authenticate(Object(apiFileCache), Object(apiCurlIO), Array) #2
/var/www/sites/web2era/public_html/googleapi/examples/index.php(37):
apiClient->authenticate() #3 {main} thrown in
/var/www/sites/web2era/public_html/googleapi/src/cache/apiFileCache.php on line
132
you can test it at :
http://web2era.com/googleapi/examples/
Original comment by lickstr....@gmail.com
on 17 Jun 2011 at 7:15
I am having the same problem 401 Invalid Credentials . . (This is a new
problem) It was working before there's something Wrong @ google's Side . .
Original comment by shehabic
on 18 Jun 2011 at 1:28
I think comment #4 above is correct. I have seen a similar error because the
token was authorized with an improper scope.
In src/config.php i changed the scope for latitude to .all.best and that fixed
the error. Other scopes are likely appropriate for different uses.
Original comment by krkee...@gmail.com
on 17 Aug 2011 at 11:17
It looks like the latitude API deprecated the
https://www.googleapis.com/auth/latitude scope and replaced it with the
following scopes:
https://www.googleapis.com/auth/latitude.all.best
https://www.googleapis.com/auth/latitude.all.city
I've included these scopes in the latest version of the client library, see
http://code.google.com/p/google-api-php-client/source/browse/trunk/src/config.ph
p#63
If you want to use granularity="best", you'll need to use the scope
'https://www.googleapis.com/auth/latitude.all.best'
Original comment by chirags@google.com
on 31 Aug 2011 at 4:56
Issue 8 has been merged into this issue.
Original comment by chirags@google.com
on 31 Aug 2011 at 4:57
Original issue reported on code.google.com by
david.an...@gmail.com
on 21 Jan 2011 at 5:51