Ruben
Ruben

Reputation: 349

Facebook og:image uses the wrong picture

I have some trouble with the picture that Facebook uses when people share posts for my website on Facebook.

When I use the Facebook debug tool you see at the bottom of the page the right picture that needs to be used on Facebook, but when you go to the Facebook post you see an other picture (the first picture on the debug page at the og:image tag). But that picture doesn't have the go:image meta tag, and the post picture is minimal 200x200 px: http://www.just40.nl/wp-content/uploads/2015/03/Dollarphotoclub_68950691-1024x712.jpg

Facebook debugger: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.just40.nl%2Fbloggers%2Fgood-old-smoking-days-dees-12%2F

How can I fix this?

Upvotes: 0

Views: 158

Answers (2)

Ruben
Ruben

Reputation: 349

Finally I found the thing that's removed the <head> tag from the page. My customer add this by her own for the new Facebook API at the top of the header.php file and distorted the head for the Facebook parser.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/nl_NL/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Upvotes: 2

Sojan Jose
Sojan Jose

Reputation: 3238

see how the parser see your page here .

Now fix the following errors

  1. og tags are supposed be in the head section of the page html.If it doesn't find it there, it will infer it according to its own liking.yours are in body tag

enter image description here

  1. your page contains multiple occurrences of og:image . fix that .

enter image description here

Upvotes: 0

Related Questions