From 97b43d1a22eda95c1fc878c764958e3195303cf9 Mon Sep 17 00:00:00 2001 From: robotscissors Date: Wed, 16 May 2018 19:15:34 -0700 Subject: [PATCH] Test twitter card and facebook with no image I have tested two events one with an image and the other without an image. I have put them through the Facebook debug sharing tool as well as the Twitter card validator and both work! --- app/views/conferences/show.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index 6ccccd0f..65db8bbc 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -3,14 +3,15 @@ %meta{ property: "og:site_name", content: (ENV['OSEM_NAME'] || 'OSEM') } %meta{ property: "og:description", content: @conference.description } %meta{ property: "og:url", content: conference_url(@conference.short_title) } - %meta{ property: "twitter:card", content: "summary_large_image" } - %meta{ property: "twitter:image", content: @image_url } %meta{ property: "twitter:title", content: (@conference.title) } %meta{ property: "twitter:description", content: @conference.description } - if @conference.picture? %meta{ property: "og:image", content: @image_url } %meta{ property: "og:image:secure_url", content: @image_url } - + %meta{ property: "twitter:card", content: "summary_large_image" } + %meta{ property: "twitter:image", content: @image_url } + - else + %meta{ property: "twitter:card", content: "summary" } = content_for :title do = @conference.title