I\'m trying to implement Google\'s login API via the instructions here, but for some reason, when I try to run it, I always get:
Fatal error: Class \'
This error means that you didn't use Composer, to install the client. Without Composer, in your script you should
set_include_path(get_include_path() . PATH_SEPARATOR . dirname($_SERVER['SCRIPT_FILENAME']) . 'vendor/google-api-php-client/src');
require_once '/path/to/autoload.php';
require_once '/path/to/Client.php';
Without the autoload.php, no class will be found. In Client.php the code before the Class definition tries to load autoload.php. But you have already found the Client.php, by giving the full path to it. So no loading of autoload.php happens there.
As you say, your problem solved when you reinstalled the API. I suppose you used Composer the second time.
Clarification: The above note does NOT mean to skip proper client installation, according to google documentation. Applies for "google/apiclient": "1.0.*@beta"