我試圖插入一個新事件到谷歌日曆,我可以用下面做精非默認的谷歌日曆:我如何插入使用Zend/PHP
$sname = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar
$client = Zend_Gdata_ClientLogin::getHttpClient($userName,$password,$sname);
$service = new Zend_Gdata_Calendar($client);
$event = $service->newEventEntry();
$event->title = $service->newTitle($name);
$event->when = array($when);
$newEvent = $service->insertEvent($event);
然而,這將只能插入默認日曆。我正嘗試使用insertEvent的URI參數來獲取我需要去的地方:
$uri = "http://www.google.com/calendar/feeds/default/[email protected]/private/full";
$newEvent = $service->insertEvent($event, $uri);
這沒有奏效。我試過編碼和解碼URI,這給了我不同的錯誤信息,但我無法得到這個工作。我幾個小時一直在Google上搜索解決方案,但沒有運氣。誰能幫忙?
謝謝。 - 戴夫