我的网页网址无法在Google日历中使用 [英] my web ical url does not work in google calendar

查看:90
本文介绍了我的网页网址无法在Google日历中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上,我有日历.用户可以将事件添加到此日历.我想为此日历创建Web链接.此链接用于将事件导入其他日历应用程序. 实际上,我已经做到了,它在Thunderbird应用程序中完美运行.生成的ics文件也非常适合在Outlook和Windows 10日历应用程序中工作.但是,它在Google日历中不起作用.当我通过URL添加日历时,谷歌说无法解析,因为语法错误. 您能帮我了解一下语法有什么问题吗?它完美地在Thunderbird中工作,所以我很纳闷. 这是我的链接生成的ics文件的示例:

In my site I have calendar. Users can add events to this calendar. I'd like to create web link for this calendar. This link is used to import events to other calendar apps. In fact I have made it and it perfect works in Thunderbird app. Generated ics file is also perfect working in Outlook and Windows 10 calendar apps. However it does not work in Google Calendar. When I add calendar by URL google says me that it cannot be parsed because syntax is wrong. Could you please help me to understand what is wrong with syntax? It perfect works in Thunderbird, so I'm wondered. This is an example of ics file which are generated by my link:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\nTest call
DTSTART:20160601T080600Z
DTEND:20160601T090600Z
UID:2f42aa2827cfb
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Concept Attention AB
DESCRIPTION:Logged call\nTest call.
DTSTART:20160930T142700Z
DTEND:20160930T152700Z
UID:d51a9949584c2
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\ntest
DTSTART:20161003T130700Z
DTEND:20161003T140700Z
UID:c5b033518dad9
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged call\nTest long row 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
DTSTART:20161109T091600Z
DTEND:20161109T101600Z
UID:d25d0c6d386ff
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\nTEST CALL
DTSTART:20161117T044100Z
DTEND:20161117T054100Z
UID:4f920ef97c547
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\ncall
DTSTART:20161117T044200Z
DTEND:20161117T054200Z
UID:62eea787772b3
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged call\nololo test Meddelande
DTSTART:20170124T120600Z
DTEND:20170124T130600Z
UID:88dac7bf56da8
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\nCALL
DTSTART:20170127T064200Z
DTEND:20170127T074200Z
UID:241f02b368978
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Wisall Holding AB
DESCRIPTION:Logged call\nTest phone log
DTSTART:20170429T120800Z
DTEND:20170429T130800Z
UID:66171144c35c7
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged call\nTest log in a group
DTSTART:20170429T121100Z
DTEND:20170429T131100Z
UID:9f169cae97c05
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged call\nTest group call log.
DTSTART:20170503T160300Z
DTEND:20170503T170300Z
UID:9fe60fb4423d8
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged call\nТестовый звонок
DTSTART:20170923T194700Z
DTEND:20170923T204700Z
UID:6c125503ad97d
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged deal\nTest deal for testing auto updating logs on live server.
DTSTART:20160623T220000Z
DTEND:20160623T230000Z
UID:190243f0cce9e
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged deal\n1
DTSTART:20160722T105700Z
DTEND:20160722T115700Z
UID:2fa244dc25034
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged deal\nzxc
DTSTART:20160905T140400Z
DTEND:20160905T150400Z
UID:7181e750e8444
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged deal\nToday deal 1
DTSTART:20160930T101400Z
DTEND:20160930T111400Z
UID:d68da964201ae
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged deal\nToday deal 2
DTSTART:20160930T161400Z
DTEND:20160930T171400Z
UID:9b952b4ff0947
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Wisall Holding AB
DESCRIPTION:Logged deal\nTest deal log
DTSTART:20170429T120900Z
DTEND:20170429T130900Z
UID:8b0069e27af19
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged interest\nHas shown interest
DTSTART:20160718T124757Z
DTEND:20160718T134757Z
UID:c5298ca4041e1
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged interest\nHas shown interest
DTSTART:20160718T124741Z
DTEND:20160718T134741Z
UID:0f75edfe91d72
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged interest\nHas shown interest
DTSTART:20170127T064157Z
DTEND:20170127T074157Z
UID:9b39355269301
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged interest\nHas shown interest
DTSTART:20170215T132012Z
DTEND:20170215T142012Z
UID:051253fab02cd
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Wisall Holding AB
DESCRIPTION:Logged interest\nHas shown interest
DTSTART:20170429T120944Z
DTEND:20170429T130944Z
UID:3ab2cf8eac258
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nHi!
DTSTART:20160905T140400Z
DTEND:20160905T150400Z
UID:3dba180e75039
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nasdasd
DTSTART:20160901T140400Z
DTEND:20160901T150400Z
UID:abc9e6b773c64
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nasdasd
DTSTART:20160909T140400Z
DTEND:20160909T150400Z
UID:92498f2de684d
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nTest 1
DTSTART:20160928T150400Z
DTEND:20160928T160400Z
UID:b0d0b95f2dd33
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nTest 2
DTSTART:20160929T162200Z
DTEND:20160929T172200Z
UID:b2ee0844a8274
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:LeaseOnline Sweden AB
DESCRIPTION:Logged meeting\n30 sept meeting
DTSTART:20160930T120400Z
DTEND:20160930T130400Z
UID:c949781fda21a
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:WIP media
DESCRIPTION:Logged meeting\nMeeting time!
DTSTART:20161001T050000Z
DTEND:20161001T060000Z
UID:6138364b7bd8c
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\ntest
DTSTART:20161116T211900Z
DTEND:20161116T221900Z
UID:e7a678e89cc89
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Wisall Holding AB
DESCRIPTION:Logged meeting\nTest meeting log
DTSTART:20170429T120900Z
DTEND:20170429T130900Z
UID:a69ef68dad077
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged meeting\nTest meeting
DTSTART:20170920T124200Z
DTEND:20170920T134200Z
UID:cf3e3d63ebd59
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nTodo.
\nTest todo.
DTSTART:20160601T080700Z
DTEND:20160601T090700Z
UID:4bb2a73ddab56
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nNew todo for testing some features.
DTSTART:20160714T135400Z
DTEND:20160714T145400Z
UID:0c3ce20e05334
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nCheck it!
DTSTART:20160719T104400Z
DTEND:20160719T114400Z
UID:336fef5464a1a
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nNext todo!
DTSTART:20160705T104600Z
DTEND:20160705T114600Z
UID:2bdd9738035a8
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:LeaseOnline Sweden AB
DESCRIPTION:Logged ToDo\ntodays todo
DTSTART:20160929T170400Z
DTEND:20160929T180400Z
UID:913d0fa75544b
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nmejl fortfarande inte can
DTSTART:20170321T085700Z
DTEND:20170321T095700Z
UID:c9c06843796c7
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Svenska ProgrammerarPoolen AB
DESCRIPTION:Logged ToDo\nand and and AND !!
DTSTART:20170320T110800Z
DTEND:20170320T120800Z
UID:e543be65bc7cf
DTSTAMP:20170920T102014Z
END:VEVENT
BEGIN:VEVENT
SUMMARY:Wisall Holding AB
DESCRIPTION:Logged ToDo\nSomething to do
DTSTART:20170429T120900Z
DTEND:20170429T130900Z
UID:dbc2480782fae
DTSTAMP:20170920T102014Z
END:VEVENT
END:VCALENDAR

在发送此数据之前,我先发送下一个标头:

Before sending this data I send next headers:

header('Content-type: text/calendar');
header('Content-Disposition: attachment; filename="calendar.ics"');

感谢您的帮助!

推荐答案

Google的ical验证器虽然不完美,但可以为您提供一些见识.看来您没有正确处理行长和换行.他们在第32行和第271行左右抱怨.您需要在连续的行的开头留一个空格-这就是为什么它在行的开头抱怨\ n的原因.

Google the ical validators, they are not perfect but they will give you some insight. It looks like you are not handling line length and new lines properly. They complain around line 32 I think and line 271. You need a blank space at the beginning of a continued line - that's why it complains about the \n at the start of a line.

! CRLF应该用于换行 !无效的名称[\ NTEST TODO

! CRLF should be used for newlines ! Invalid name [\NTEST TODO

这篇关于我的网页网址无法在Google日历中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆