How to set the share image when clicking the like button
Asked Answered
E

3

9

I am setting up a blog and it contains a Facebook "Like" button. With this button you can like a post.

But when I like a post, a popup shows up with a randomly picked image on my website. I've looked into the meta tags for Facebook and I filled all six of them with content, but clicking the Like button still causes that same random image shows up. How can I control this image when I click the Like button?

Elegance answered 23/1, 2012 at 14:28 Comment(0)
A
18

Include the following meta tag in your site:

<meta property="og:image" content="path-to/mylogo.png" />

More info about open graph images can be found here. After changing the image, Facebook needs time to update this information due to caching.

Edit: you can view and reset Facebooks cache with the developer tool debug page

Archdiocese answered 23/1, 2012 at 14:35 Comment(1)
Ok, then I'll wait some time to let fb update the cache and check again tomorrow.Elegance
W
4

That is because when you change facebook's og (open graph) tags, you cannot see the change immediately, but only when their scraper refreshes the page. Try putting the url through their debugger. If the image here is the one you set up as shared image, then you just have to wait for facebook cache to refresh :)

Wardlaw answered 23/1, 2012 at 14:34 Comment(0)
A
-1

Here is one more alternative approach: http://www.clickonf5.org/5536/how-insert-custom-image-thumbnail-facebook-link-sharing/

Alleyn answered 25/10, 2013 at 7:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.