2
我可以通过Google日历的API在我的帐户中创建Google日历,但我也想分享它。有没有办法做到这一点编程?通过Google的API共享Google日历
我可以通过Google日历的API在我的帐户中创建Google日历,但我也想分享它。有没有办法做到这一点编程?通过Google的API共享Google日历
从谷歌日历API文档:Sharing calendars
试试这个功能,看看它是否工作。这将使日历在您的域内广泛分享。
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);
}
我用它,但无法分享我的日历 – Manish 2010-08-09 13:42:30
API的工作原理。现在,如果你没有告诉我们你是如何使用它的,我们无法帮助你。 – 2010-08-09 13:52:44
该链接无效! – Mishax 2016-09-19 16:05:54