我正在尝试设置连接到Google Calendar API的应用程序。
到目前为止,我有:
Class 'apiClient' not found...
的index.php
<?php
set_include_path('src');
require_once "Google/Client.php";
require_once "Google/Service/Calendar.php";
$apiClient = new apiClient(); <---LINE CAUSING THE ERROR
$apiClient->setUseObjects(true);
$service = new apiCalendarService($apiClient);
if (isset($_SESSION['oauth_access_token'])) {
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $apiClient->authenticate();
$_SESSION['oauth_access_token'] = $token;
}
?>
答案 0 :(得分:0)
我也发现了这个问题。发生了什么事情,他们已经更新了api而不是文档。尝试将包含更改为
$g_Client = new Google_Client();
$g_Cal = new Google_CalendarService($g_Client);