如何为 Apple 设备创建“添加到日历”链接?

问题描述 投票:0回答:3

我正在为 Google、Outlook、Yahoo 和 Apple 创建“添加到日历”链接。我已经创建了除 Apple 之外的所有链接。我想为苹果设备创建一个链接,将事件保存在苹果日历中。我创建的谷歌日历链接是 https://calendar.google.com/calendar/r/eventedit?text=预约+确认&日期=20181109T083000Z/20181113T090000Z&details=Vein+Clinics+of+Alexandria+Appointment&location=4904+神学院+路+套房+130+亚历山大,+ VA+22311” 我想为苹果创建这样的链接。我可以得到一些帮助吗? 我正在使用 Windows,也在 iPhone 设备上进行测试。

php html coldfusion-11
3个回答
5
投票

只有 Google 日历链接看起来像这样。 对于 Apple 和其他所有设备,您应该创建一个 .ics 文件,它是一个事件文件。 您可以在此处将其创建为 .ics 文件: https://apps.marudot.com/ical/

Litmus 还有一篇关于如何创建“添加到日历”按钮的有用文章,我上周刚刚关注了该文章,并对我的电子邮件模板进行了一些细微的调整。

https://litmus.com/blog/how-to-create-an-add-to-calendar-link-for-your-emails


1
投票
  • 我也遇到这个问题了。我解决了。
  • 对于Apple设备,我们必须使用.ics文件作为电子邮件附件。
  • 我在node.js中使用这个包 日历链接
  • 它可以生成日历链接和.ics文件内容。
  • 然后将其附加到您的电子邮件中。
  • 您可以像这样将其读取为 Base64 字符串
 const str = Buffer.from(decodeURIComponent(ics(calendarConfig).toString().split('charse=utf8,')[1])).toString('base64');

// attach this str as an attachment into your email

© www.soinside.com 2019 - 2024. All rights reserved.