[英]Event description in JSON-LD does not appear to be interpreted in Gmail
[英]JSON-LD “Event reservation” update & cancellation
我被要求在从事件门户发送的EVENT RESERVATION电子邮件中实施JSON-LD标准,以便从用户日历中自动添加,更新和取消事件。
我正在从Google https://developers.google.com/gmail/markup/reference/event-reservation#update_a_event跟随本教程
我只设法在用户收到预订电子邮件时自动添加一个事件,但是我一直在努力寻找一种方法来实现更新和取消。
对于ADD事件,我正在使用此代码
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "EventReservation", "reservationNumber": "E123456789", "reservationStatus": "http://schema.org/Confirmed", "underName": { "@type": "Person", "name": "John Smith" }, "reservationFor": { "@type": "Event", "name": "Foo Fighters Concert", "startDate": "2017-03-06T19:30:00-08:00", "location": { "@type": "Place", "name": "AT&T Park", "address": { "@type": "PostalAddress", "streetAddress": "24 Willie Mays Plaza", "addressLocality": "San Francisco", "addressRegion": "CA", "postalCode": "94107", "addressCountry": "US" } } } } </script>
然后,我尝试将此代码发送给UPDATE事件,但是我没有注意到日历中的任何更改。 该活动仍在同一日期。
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "EventReservation", "reservationNumber": "E123456789", "reservationStatus": "http://schema.org/Confirmed", "underName": { "@type": "Person", "name": "John Smith" }, "reservationFor": { "@type": "Event", "name": "Foo Fighters Concert", "startDate": "2017-03-06T20:00:00-08:00", "location": { "@type": "Place", "name": "AT&T Park", "address": { "@type": "PostalAddress", "streetAddress": "24 Willie Mays Plaza", "addressLocality": "San Francisco", "addressRegion": "CA", "postalCode": "94107", "addressCountry": "US" } } }, "modifiedTime": "2013-05-01T08:00:00-08:00" } </script>
您知道为什么直接从Google教程中获取代码的原因。 不管用? 以及如何实现这些功能?
首次添加事件时,您应尝试添加“ modifiedTime”标签,因为它充当预订时间。
然后,Google会检测到,如果ID相同且ModifyedTime不同,则应更新事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.