Reputation: 355
I have used example from this site.
I have just added the credentials and the line:
require_once APPPATH . "libraries/google-api-php-client-master/src/Google/autoload.php";
in the controller.
It gives the following error :
Fatal error: Uncaught exception 'Exception' with message 'This library must be installed via composer or by downloading the full package. See the instructions at https://github.com/google/google-api-php-client#installation.' in /var/www/html/gauth/application/libraries/google-api-php-client-master/src/Google/autoload.php:14 Stack trace: #0 /var/www/html/gauth/application/controllers/user_authentication.php(15): require_once() #1 [internal function]: User_Authentication->index() #2 /var/www/html/gauth/system/core/CodeIgniter.php(360): call_user_func_array(Array, Array) #3 /var/www/html/gauth/index.php(202): require_once('/var/www/html/g...') #4 {main} thrown in /var/www/html/gauth/application/libraries/google-api-php-client-master/src/Google/autoload.php on line 14
Please help, I am doing this for the first time!
Upvotes: 0
Views: 1173
Reputation: 2568
It is because your project missed the lib google-api-php-client
,suggest you install it via composer.
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === 'fd26ce67e3b237fffd5e5544b45b0d92c41a4afe3e3f778e942e43ce6be197b9cdc7c251dcde6e2a52297ea269370680') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"
composer require google/apiclient:^2.0.0@RC
Upvotes: 1