фатальная ошибка: класс 'google_auth_assertioncredentials' не найдено в
example.phpобразное /> < /blockquote>
так я пытаюсь: < /p>
< /blockquote> .
Код: Выделить всё
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once 'google-api-php-client/vendor/autoload.php';
//$p12FilePath = '/path/to/key.p12';
$serviceClientId = '395545742105.apps.googleusercontent.com';
$serviceAccountName = '395545742105@developer.gserviceaccount.com';
$scopes = array(
'https://www.googleapis.com/auth/analytics.readonly'
);
$googleAssertionCredentials = new Google_Auth_AssertionCredentials(
$serviceAccountName,
$scopes
); // setAssertionCredentials($googleAssertionCredentials);
$client->setClientId($serviceClientId);
$client->setApplicationName("Project");
$analytics = new Google_Service_Analytics($client);
Код: Выделить всё
Google_Auth_AssertionCredentials removed use Google_Client::setAuthConfig insteadНо как мне использовать его в конструкторе?
Я попробовал
Код: Выделить всё
$googleAssertionCredentials = new Google_Client::setAuthConfig(
$serviceAccountName,
$scopes
);
Есть идеи, что мне здесь не хватает?
Подробнее здесь: https://stackoverflow.com/questions/341 ... -not-found
Мобильная версия