简体   繁体   中英

Facebook wordpress site sharing with the wrong image

I'm with a problem with a wordpress site and facebook sharing. My site does not have any sharing button, the share I'm talking about is when any user paste the url at facebook, the image that appears is some random image and not the logo that I want to appear.

What I've tried so far:

<meta property="og:url" content="http://example.com">
<meta property="og:title" content="example name">
<meta property="og:site_name" content="example name">
<meta property="og:image" content="http://example.com/wp-content/uploads/2014/03/logo_example.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="105">
<meta property="og:image:height" content="72">
<link rel="image_src" type="image/png" href="http://example.com/wp-content/uploads/2014/03/logo_example.png" />

This code is an example, the links to images doesn't work.

My solution:

At this site: https://developers.facebook.com/tools/debug/og/object/ I could debug the facebook metatags and discovered that my image has to be at least 200x200 px. Because it wasn't, facebook got always other images to build the share. So, I had to change my image and removed the width and height meta tags too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM