這是一個新手的問題,我不習慣谷歌API尚未PHP谷歌日曆API - 更新事件
嗨,
我使用谷歌提供的代碼(https://developers.google.com/google-apps/calendar/downloads ),這些例子(最初是因爲它看起來更新)。
我正在成功檢索日曆,例如「calendar/simple.php」所示(OAuth2設置正確)。
在那之後,我做這個和它的工作原理(這是一個非必要的代碼,只是爲了檢查,如果事件能夠正確檢索沒有任何錯誤):
$test = $cal->events->get("[email protected]","longeventcodegivenbygoogle");
現在,我希望能夠設置特定事件的某些值。
$event = new Event();
$event->setLocation('Somewhere');
$test = $cal->events->update("[email protected]","longeventcodegivenbygoogle",$event);
但它給我:
(!) Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling PUT https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/longeventcodegivenbygoogle?key=myapikey: (400) Required' in C:\wamp\www\test\Gapi3\src\io\apiREST.php on line 86
(!) apiServiceException: Error calling PUT https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/longeventcodegivenbygoogle?key=myapikey: (400) Required in C:\wamp\www\test\Gapi3\src\io\apiREST.php on line 86
我該怎麼辦錯了嗎?
感謝您的幫助。
你似乎需要使用新的Google_Event – Enkay