繁体   English   中英

无法使用电子邮件更新Google即时贴

[英]Cannot update Google Now card using email

我正在尝试测试从电子邮件触发Google即时贴,然后使用ModifyedTime属性更新时间。 这是我用来触发初始Google即时贴的初始电子邮件的标记(正在运行):

<html>
<body>

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EventReservation",
  "reservationNumber": "E123456789",
  "reservationStatus": "http://schema.org/Confirmed",
  "underName": {
    "@type": "Person",
    "name": "Test Person"
  },
  "reservationFor": {
    "@type": "Event",
    "name": "Test Event",
    "startDate": "2015-05-19T16:00:00-05:00",
    "location": {
      "@type": "Place",
      "name": "Your Home",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "111 Main Street",
        "addressLocality": "Columbus",
        "addressRegion": "OH",
        "postalCode": "43215",
        "addressCountry": "US"
      }
    }
  },
  "modifyReservationUrl": "http://www.test.com/testing"
}
</script>
<div>Test Appointment</div>
</body>
</html>

这是我用来尝试更新Google即时贴以反映时间变化的后续电子邮件(无效):

<html>
<body>

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EventReservation",
  "reservationNumber": "E123456789",
  "reservationStatus": "http://schema.org/Confirmed",
  "underName": {
    "@type": "Person",
    "name": "Test Person"
  },
  "reservationFor": {
    "@type": "Event",
    "name": "Test Event",
    "startDate": "2015-05-19T16:00:00-05:00",
    "location": {
      "@type": "Place",
      "name": "Your Home",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "111 Main Street",
        "addressLocality": "Columbus",
        "addressRegion": "OH",
        "postalCode": "43215",
        "addressCountry": "US"
      }
    }
  },
  "modifyReservationUrl": "http://www.test.com/testing",
  "modifiedTime": "2015-05-19T18:00:00-05:00"  
}
</script>
<div>Test Appointment Changed</div>
</body>
</html>

根据此处的文档: https : //developers.google.com/gmail/markup/reference/event-reservation#update_a_event我读到“您可以仅通过发送更新的事件保留并将修改时间设置为时间来更新事件保留”,那么这两封电子邮件之间的唯一区别是电子邮件的正文以及我在第二封邮件中包含了ModifyTime的事实。

一些额外的背景信息:1.在发送之前,我已经在这里验证了我的标记: https : //www.google.com/webmasters/markup-tester 2.我正在使用Gmail操作示例应用程序发送测试电子邮件: http: //gmail-actions.appspot.com/

在查看了第一封电子邮件和后续电子邮件中的标记之后,看起来您的startDate属性是相同的(2015-05-19T16:00:00-05:00)。 您的后续电子邮件应在startDate属性中具有更新时间(2015-05-19T18:00:00-05:00)。

如果您在documentaiton上查看了描述,则ModifyTime属性是您在上次修改保留时间时输入的信息,而不是实际更新时间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM