2

As a test, I ran one line of code in PHP to implement the PHP Client Library.

indexTest.php

<?php
require_once realpath(dirname(__FILE__).'/google-api-php-client/autoload.php');
return;

I get this error:

Deprecated: google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This redirect will be removed in 1.2. Please adjust your code to use the new location. in C:\Users\NoName\Documents\academic-being-90217\google-api-php-client\autoload.php on line 25

What do I need to do to fix this?

Alan Wells
  • 30,746
  • 15
  • 104
  • 152

1 Answers1

3

Quick Fix:

require_once realpath(dirname(__FILE__).'/google-api-php-client/src/Google/autoload.php');

Google need to update their documentation on the API. (I spent quite a while getting myself in a fuddle recently, trying to get it working using their documentation).

What is you final aim on using the API? Is it just for Login? If you need any help with it, I'll be more than happy to talk you through anything that isn't working as it should be

Just Lucky Really
  • 1,341
  • 1
  • 15
  • 38
  • Ooo ... I've only used it to authorize users, and get some info ... I can get you that far Lol ... Is it just for 1 account you are using the API for? So that you can create your own bespoke 'Upload to my google drive' page? – Just Lucky Really Apr 03 '15 at 20:40
  • This guy seems to know the answer: http://stackoverflow.com/questions/19766912/how-do-i-authorise-a-background-web-app-without-user-intervention-canonical – Just Lucky Really Apr 03 '15 at 21:12
  • It depends which version of the API you are using – Just Lucky Really Jul 06 '15 at 11:33
  • It is there: https://github.com/google/google-api-php-client/blob/master/src/Google/autoload.php ... Looks like you've just not downloaded it correctly ... – Just Lucky Really Jul 06 '15 at 12:03
  • That's so weird... I'm looking at the folder now, and the file isn't there. I just downloaded it before, and that file is not in the folder. Maybe something went wrong when I downloaded it? – Daniel Jul 06 '15 at 12:10