2010-08-09 151 views

回答

4

從谷歌日曆API文檔:Sharing calendars

+0

我用它,但無法分享我的日曆 – Manish 2010-08-09 13:42:30

+2

API的工作原理。現在,如果你沒有告訴我們你是如何使用它的,我們無法幫助你。 – 2010-08-09 13:52:44

+0

該鏈接無效! – Mishax 2016-09-19 16:05:54

0

試試這個功能,看看它是否工作。這將使日曆在您的域內廣泛分享。

function updateACLRole($cal_id, $USER) { 
    $data = "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007' > 
     <category scheme='http://schemas.google.com/g/2005#kind' 
     term='http://schemas.google.com/acl/2007#accessRule'/> 
     <gAcl:scope type='domain' value='".$this->CONSUMER_KEY."' ></gAcl:scope> 
     <gAcl:role value='http://schemas.google.com/gCal/2005#read'></gAcl:role> 
    </entry>"; 
    $uri = 'https://www.google.com/calendar/feeds/' . $cal_id . '/acl/full/domain%3A'.$this->CONSUMER_KEY.'?xoauth_requestor_id=' . urlencode($USER); 

    $result = $this->gdataCal->put($data, $uri); 

}