如何通过直接链接将WebCal/iCalendar添加到Google日历

Vas*_*ily 7 icalendar google-calendar-api webcal

您可以通过直接链接将Google托管的日历添加到您的Google日历帐户(例如,在澳大利亚的假期 - 左下角的按钮 - 如果您点击它,则日历将添加到您的帐户中).
我的网站上有一个网络日历,我想在示例中添加一个指向我日历的按钮.
我怎样才能做到这一点?

小智 12

您可以使用以下链接执行此操作:

https://www.google.com/calendar/render?cid=
Run Code Online (Sandbox Code Playgroud)

在=符号之后是指向ICS文件的链接.例如:

https://www.google.com/calendar/render?cid=http://www.example.com/calendar.ics
Run Code Online (Sandbox Code Playgroud)