{"id":298,"date":"2011-07-06T14:30:40","date_gmt":"2011-07-06T14:30:40","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=298"},"modified":"2011-07-06T14:32:16","modified_gmt":"2011-07-06T14:32:16","slug":"facebook-like-image-thumbnail","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/facebook-like-image-thumbnail\/","title":{"rendered":"Facebook like image thumbnail"},"content":{"rendered":"<p>If you offer a facebook like button on your site, you may have noticed that Facebook chooses a random image from your site as the thumbnail for the item in the Facebook news feed.<\/p>\n<p>This image can be controlled on your end. I&#39;ve read <a class=\"target-blank\" href=\"http:\/\/bobbelderbos.com\/2011\/03\/facebook-like-button-right-image\/\">blog posts<\/a> which lead up to the solution, but don&#39;t take it home. If you add the Open Graph meta tag as follows:<\/p>\n<pre><code>&lt;meta property=&quot;og:tag name&quot; content=&quot;image url&quot; \/&gt;\r\n\r\n<\/code><\/pre>\n<p>You might be disappointed to find that Facebook still chooses a random image. In order for the above to work, you need to supplement it with 5 additional Open Graph meta tags. The are discussed in Facebook&#39;s developer documentation, under <a class=\"target-blank\" href=\"http:\/\/developers.facebook.com\/docs\/reference\/plugins\/like\/\">Open Graph Tags<\/a>.<\/p>\n<p>ColdFusion example:<\/p>\n<p><code>&lt;head&gt;<br \/>\n\t...<br \/>\n\t&lt;<span class=\"start-tag\">meta<\/span><span class=\"attribute-name\"> property<\/span>=<span class=\"attribute-value\">&quot;og:title&quot; <\/span><span class=\"attribute-name\">content<\/span>=<span class=\"attribute-value\">&quot;My Page Title&quot; <\/span><span class=\"error\"><span class=\"attribute-name\">\/<\/span><\/span>&gt;<br \/>\n\t&lt;meta property=&quot;og:type&quot; <br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; content=&quot;&lt;cfif CGI.SCRIPT_NAME eq &quot;\/index.cfm&quot;&gt;website&lt;cfelse&gt;article&lt;\/cfif&gt;&quot; \/&gt;<br \/>\n\t&lt;<span class=\"start-tag\">meta<\/span><span class=\"attribute-name\"> property<\/span>=<span class=\"attribute-value\">&quot;og:image&quot; <\/span><span class=\"attribute-name\">content<\/span>=<span class=\"attribute-value\">&quot;http:\/\/www.mysite.com\/src\/img\/logo.png&quot; <\/span><span class=\"error\"><span class=\"attribute-name\">\/<\/span><\/span>&gt;<br \/>\n\t&lt;<span class=\"start-tag\">meta<\/span><span class=\"attribute-name\"> property<\/span>=<span class=\"attribute-value\">&quot;og:url&quot; <\/span><span class=\"attribute-name\">content<\/span>=<span class=\"attribute-value\">&quot;http:\/\/www.mysite.com\/&quot; <\/span><span class=\"error\"><span class=\"attribute-name\">\/<\/span><\/span>&gt;<br \/>\n\t&lt;<span class=\"start-tag\">meta<\/span><span class=\"attribute-name\"> property<\/span>=<span class=\"attribute-value\">&quot;og:site_name&quot; <\/span><span class=\"attribute-name\">content<\/span>=<span class=\"attribute-value\">&quot;My Site Name&quot; <\/span><span class=\"error\"><span class=\"attribute-name\">\/<\/span><\/span>&gt;<br \/>\n\t&lt;meta property=&quot;fb:app_id&quot; content=&quot;xxxxxxxxxxx&quot; \/&gt; <br \/>\n\t... <br \/>\n\t&lt;\/head&gt;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you offer a facebook like button on your site, you may have noticed that Facebook chooses a random image from your site as the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[77,101],"tags":[102],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/298"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":3,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/298\/revisions\/301"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}