google-api - 以编程方式订阅外部 ical

标签 google-api google-calendar-api google-apps icalendar

通过 Google 日历 UI,用户可以将外部 iCAL 日历添加到他们的 CalendarList。

通过 CalendarList 检索该日历时,不包括日历 URL。此外,似乎无法将外部 iCal 日历添加到用户的 CalendarList。

是这样吗?有没有办法以编程方式将 Google 日历用户订阅到外部 iCal 提要?

在内部,日历 UI 使用以下 URL 添加外部日历:

https://calendar.google.com/calendar/addcalendarfromurl



此 URL 通过 POST 或 GET 获取以下参数:
  • curl :日历网址(网址编码)。
  • cimp : UI 将此设置为 true,不确定它的作用。
  • cpub : true|false - 公开日历
  • :来自客户端的安全 ID(可能是 session ID)。不指定这会带来 403 错误。

  • 如果用户未登录日历,他们将被重定向到 Google 登录屏幕。如果我有办法生成 secid(可能是 OAUTH?),我可以添加一个链接以允许用户自动添加日历。

    最佳答案

    不幸的是,具有导入 .ics 功能的 Google Calendar API 似乎没有任何更新。 A ticket自 2007 年以来已被记录,截至目前仍未有任何解决方案。
    我能找到的唯一选择是在用户的 Google 日历网络用户界面中手动导入 .ics 文件。 Import events to Google Calendar支持页面讨论了这个问题。

    Step 2: Import events into Google Calendar

    After you've exported your events, you can import them into Google Calendar.

    1. Open Google Calendar on a computer. Note: You can only import from a computer, not a phone or tablet.
    2. In the top right, click Settings settings gear button > Settings.
    3. Open the Calendars tab.
    4. Click Import calendars between the "My calendars" and "Other Calendars" sections.
    5. Click Choose File and select the file you exported. The file should end in "ics" or "csv"
    6. Choose which calendar to add the imported events to. By default, events will be imported into your primary calendar.
    7. Click Import.

    If you're using a ZIP file, find it on your computer and open it. You'll see ICS files for each of your calendars. Take the individual files out of the ZIP file, and import each ICS file individually.

    Note: Repeating events might not show up that way if you import them from a CSV file, but they'll be on your calendar as a series of one-time events.

    关于google-api - 以编程方式订阅外部 ical,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36000854/

    相关文章:

    oauth - Google API key 的有效期是多久?

    oauth - 为什么下载字幕会返回“需要登录”?

    php - 使用服务帐户插入 Google 日历条目

    fullcalendar - 如何使用 FullCalendar 将事件添加到 Google 日历?

    smtp - 如何从不存在的(自动生成的唯一 ID)电子邮件发送电子邮件?

    javascript - 通过 Google 电子表格中的几行迭代函数

    .net - 如何使用 ASP.net Google 分析 api 版本 3(Google.Apis.Analytics.v3.dll) 发送 Google 分析报告查询?

    google-calendar-api - 更新谷歌事件时出错

    web-applications - 在 Google Apps 中批量更新转发地址

    youtube - snippet.defaultLanguage使用哪种字符串?