1
我能列出從默認的谷歌日曆事件,但試圖從其他日曆列表中的事件的時候,我得到了錯誤:如果外部日曆不支持是否可以從外部日曆查詢事件?
PHP Fatal error: Uncaught exception 'Google_Service_Exception' with message '{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
我不知道,還是我這些外部消息的錯誤ID。我使用這種方法CalendarList: list
來查詢我帳戶中的所有可用日曆,但只有第一個可用(我的默認)。我不知道這是否是獲得ID的正確方法:
$calendarList = $service->calendarList->listCalendarList();
while(true) {
foreach ($calendarList->getItems() as $calendarListEntry) {
echo $calendarListEntry->getSummary();
echo "\r\n";
}
$pageToken = $calendarList->getNextPageToken();
if ($pageToken) {
$optParams = array('pageToken' => $pageToken);
$calendarList = $service->calendarList->listCalendarList($optParams);
} else {
break;
}
}
我做的,意思是正下方的錯誤代碼 – Casper
日曆的ID從ID字段中的電子郵件地址,而不是總結。 – luc