{"id":1085090,"date":"2016-03-03T16:37:49","date_gmt":"2016-03-04T00:37:49","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/"},"modified":"2016-03-22T09:35:05","modified_gmt":"2016-03-22T16:35:05","slug":"events-will-not-share-correct-thumbnail-to-facebook","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/","title":{"rendered":"Events will not share correct thumbnail to Facebook"},"content":{"rendered":"<p>I have searched the forum- no luck so posting here.<\/p>\n<p>I have finally found a fix to at least set a default image to post to Facebook but I still cannot find a fix to get tribe events to show featured image when shared to Facebook. It&#8217;s driving me and my artists bonkers!!<\/p>\n<p>I am using the code below in functions.php to try to force Facebook to use featured image but it&#8217;s not working. Can anyone please help?<\/p>\n<p>function insert_image_src_rel_in_head() {<br \/>\n\tglobal $post;<br \/>\n\tif ( !is_singular()) \/\/if it is not a post or a page<br \/>\n\t\treturn;<br \/>\n\tif(!has_post_thumbnail( $post-&gt;ID )) { \/\/the post does not have featured image, use a default image<br \/>\n\t\t$default_image=&#8221;http:\/\/anywherefest.com\/wp-content\/uploads\/2016\/03\/gremlins.jpg&#8221;; \/\/replace this with a default image on your server or an image in your media library<br \/>\n\t\techo &#8216;&lt;meta property=&#8221;og:image&#8221; content=&#8221;&#8216; . $default_image . &#8216;&#8221;\/&gt;&#8217;;<br \/>\n\t}<br \/>\n\telse{<br \/>\n\t\t$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), &#8216;medium&#8217; );<br \/>\n\t\techo &#8216;&lt;meta property=&#8221;og:image&#8221; content=&#8221;&#8216; . esc_attr( $thumbnail_src[0] ) . &#8216;&#8221;\/&gt;&#8217;;<br \/>\n\t}<br \/>\n\techo &#8221;<br \/>\n&#8220;;<br \/>\n}<br \/>\nadd_action( &#8216;wp_head&#8217;, &#8216;insert_image_src_rel_in_head&#8217;, 5 );<\/p>\n","protected":false},"template":"","class_list":["post-1085090","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Events will not share correct thumbnail to Facebook -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events will not share correct thumbnail to Facebook -\" \/>\n<meta property=\"og:description\" content=\"I have searched the forum- no luck so posting here. I have finally found a fix to at least set a default image to post to Facebook but I still cannot find a fix to get tribe events to show featured image when shared to Facebook. It&#8217;s driving me and my artists bonkers!! I am [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-03-22T16:35:05+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/\",\"name\":\"Events will not share correct thumbnail to Facebook -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-03-04T00:37:49+00:00\",\"dateModified\":\"2016-03-22T16:35:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Events will not share correct thumbnail to Facebook\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Events will not share correct thumbnail to Facebook -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/","og_locale":"en_US","og_type":"article","og_title":"Events will not share correct thumbnail to Facebook -","og_description":"I have searched the forum- no luck so posting here. I have finally found a fix to at least set a default image to post to Facebook but I still cannot find a fix to get tribe events to show featured image when shared to Facebook. It&#8217;s driving me and my artists bonkers!! I am [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/","article_modified_time":"2016-03-22T16:35:05+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/","name":"Events will not share correct thumbnail to Facebook -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-03-04T00:37:49+00:00","dateModified":"2016-03-22T16:35:05+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-will-not-share-correct-thumbnail-to-facebook\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Events will not share correct thumbnail to Facebook"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085090\/revisions"}],"predecessor-version":[{"id":1086028,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1085090\/revisions\/1086028"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1085090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}