× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

facebook share pop up doesn't show image on first attempt.

Feb 27, 2016
<p>When sharing content using facebook sdk, sometimes the picture from <strong>og:image</strong> doesn't show up within the popup window. Turns out, if you set <strong>og:image:width</strong> and <strong>og:image:height</strong> meta tags, it forces the ui to display image. </p> <p> </p> <pre><code class="language-html">&lt;!-- doesn't work --&gt; &lt;meta name="og:image" content="http://site.com/image.jpeg" /&gt; &lt;!-- works --&gt; &lt;meta name="og:image:width" content="450" /&gt; &lt;meta name="og:image" content="300" /&gt;</code></pre> <p> </p>
comments powered by Disqus