2016-11-21 66 views
0

我嘗試了許多事情和標籤,包括使用宏數據和JSON-LD,但是我無法顯示公司徽標。如何使用Google電子郵件事件預留模式在Google now卡中顯示公司徽標

我不確定我如何顯示圖像,如其文檔頁面here上的google示例所示。

[ 
 
    { 
 
     "@context": "http://schema.org", 
 
     "@type": "EventReservation", 
 
     "reservationNumber": "OIU888888", 
 
     "reservationStatus": "http://schema.org/Confirmed", 
 
     "url": "http://example.com", 
 
     "underName": { 
 
     "@type": "Organization", 
 
     "name": "ABC, Inc." 
 
     }, 
 
     "reservationFor": { 
 
     "@type": "BusinessEvent", 
 
     "name": "Invite", 
 
     "url": "http://example.com", 
 
     "performer": { 
 
      "@type": "Organization", 
 
      "name": "ABC", 
 
      "image": "http://103.56.173.67/images/footer-logo.png" 
 
     }, 
 
     "startDate": "2016-11-18T19:00:00", 
 
     "location": { 
 
      "@type": "Place", 
 
      "name": "AT&T Park", 
 
      "address": { 
 
      "@type": "PostalAddress", 
 
      "streetAddress": "AT&T Park", 
 
      "addressLocality": "San Francisco", 
 
      "addressRegion": "CA", 
 
      "postalCode": "94107", 
 
      "addressCountry": "US" 
 
      } 
 
     } 
 
     }, 
 
     "potentialAction":{ 
 
     "@type": "ViewAction", 
 
     "target" : "<<MobileAccess>>", 
 
     "url": "http://example.com", 
 
     "name" : "<<GMJoinByComputer>>" 
 
     } 
 
    } 
 
]

如果有人有興趣,歡迎任何幫助,我將分享更多的信息。

回答

0

當我檢查documentation時,請確保您查看電子郵件的詳細信息,以查看這些屬性是否適用於您的活動預訂。確保您已將reservationFor.image屬性用於事件圖像的URL。

你可能會檢查這些線程:Can you and how do you embed images in an email when using the Gmail API?Google Now Event card - How to display more information如果有幫助。

+0

我已經做了一點,我認爲可以涉及[鏈接](https://stackoverflow.com/questions/22924706/google-schemas-sender-image)或這裏[鏈接](https:// stackoverflow .com/questions/22672909/will-the-gmail-offers-publisher-name-override-sender-name/22675087#22675087)。由於我正在測試這種情況,所以可能會出現這種情況,因爲我無法通過地址顯示圖像,因此我的電子郵件和個人資料都是公司之一。有什麼建議麼? 此外,我關心的是在google now card中顯示圖片,而不是在電子郵件中顯示圖片。 –

0

@Yash Cauhan我注意到你的事件類型是「BusinessEvent」。通過我的知識和測試,我發現只有在使用事件類型「MusicEvent」時纔會顯示圖像。

在瀏覽documentation時,我注意到圖像屬性僅用於Music Event示例中。作爲解決方法,如果您希望圖像出現,我會將您的事件類型設置爲MusicEvent。

我希望這會有所幫助。