如何使用Zend / PHP插入非默认Google日历

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了如何使用Zend / PHP插入非默认Google日历脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在GOOGLE日历中插入一个新事件,我可以通过以下方式做到

$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/something@somethingelse.com/PRivate/full";
$newEvent = $service->insertEvent($event,$uri);

这没效果.我已经尝试过编码和解码URI,这给了我不同的错误信息,但我无法让它工作.我一直在谷歌搜索解决方案几个小时没有运气.有人可以帮忙吗?

谢谢.
– 戴夫

解决方法

发现问题:
上面的URI不起作用:
http://www.google.com/calendar/feeds/default/something@somethingelse.com/private/full”;

应该认部分.

此外,@符号应由编码替换.所以它应该是:
http://www.google.com/calendar/feeds/something%40somethingelse.com/private/full”;

脚本宝典总结

以上是脚本宝典为你收集整理的如何使用Zend / PHP插入非默认Google日历全部内容,希望文章能够帮你解决如何使用Zend / PHP插入非默认Google日历所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。