Reputation: 5407
The official tutorial on Core Reporting API tells us to include two files:
require_once 'google-api-php-client/src/Google_Client.php';
require_once 'google-api-php-client/src/contrib/Google_AnalyticsService.php';
However, as we can see on the GitHub page (https://github.com/google/google-api-php-client), there is no Google_Client.php
file (in fact, I can't find it anywhere inside the folders). Is the official tutorial out of date or something? What can I do?
Upvotes: 2
Views: 9910
Reputation: 775
Please Try below code,Pleae include autoload.php
file...
require_once 'google-api-php-client/autoload.php';
$client = new Google_Client();
$client->setApplicationName("Client_Library_Examples");
$client->setDeveloperKey("YOUR_APP_KEY");
$service = new Google_Service_Books($client);
Upvotes: 4