How to Use Facebook Debugger to Fix WordPress Links on Facebook
Most of us have posted, or have seen someone post, an article to Facebook only to see the wrong featured image display. I’ve often delete the post and reposted again just to find the wrong thumbnail posted again. I’ve even had to delete the preview and supply my own image, which causes another set of issues. This is a common problem with sharing WordPress content. Fortunately it’s easy to fix using the Facebook Debugger.
In this article we’ll take a look at what is causing the problem and how to use the Facebook Debugger to solve this headache completely. Images for the example posts were taken from Unsplash.com.
What’s Causing the Problem
There are actually many causes for this problem, and it isn’t always easy to know which one is causing your specific issue. The most likely cause is the improper use of og tags (Open Graph tags, set as og:image) where the featured image is smaller than the others.
When you share an article, Facebook tries to guess which thumbnail is the best to use. It does this by using og tags, and sometimes chooses a larger image than the one you’ve set. Sometimes the og tag is missing. It can also be caused by cache plugins or hosting such as CDN systems not picking up the correct image.
It can also be cause by using an image size that Facebook doesn’t like. Facebook recognizes images that are at least 200 x 200 pixels but prefers larger images of at least 600 x 315. A resolution of 1200 x 630 is ideal for large displays.
The problem can be solved several ways. One option is to manually upload the images yourself. The problem with this solution is clicking the image opens the image in a lightbox rather than taking the reader to the article and the image is stored in your uploaded images and on your timeline. This is only a partial solution as anyone else that shares your article will see and share the wrong image.
Perhaps the best solution is to troubleshoot the problem using Facebook Sharing Debugger. Although we’re focusing on images here, the debugger will also test URL’s, titles, descriptions, other types of media, and more.
Using Facebook’s Sharing Debugger
The Facebook Sharing Debugger is available in the Facebook For Developers toolbox. This is a tool that will crawl your page and look at your meta tags and display errors. It will even test your HTML.
To use it paste in the URL of your WordPress post and select Debug. This will provide you with errors to fix. Once you’ve fixed the errors, click Scrape Again to clear the cache so Facebook will see your new image.
The image has to be pre-cached before it will display in the sharing app. You’ll either have to pre-cache the image by running it in the Sharing Debugger, or use Open Graph tags (og:image:width and og:image:height) so the crawler can render it without having to process it first.
Facebook Debugger Examples
No image Set, Small First Image
This article doesn’t have a featured image specified. It grabbed the second image instead of the first.
The Debugger tells me to provide the featured image. The reason it selected the second image over the first has to do with the size of the image. The first is 108 pixels. This is below the desired 200 pixels so Facebook ignores it.
Featured Image Too Small
Here’s a post using the small image as the featured image. Although the featured image was set, Facebook doesn’t even recognize it.
Facebook gives me the option of choosing images from the article. The small image isn’t even an option.
The debugger shows the image is too small. Replace the featured image with a larger image.
Large Featured Image
In this example the featured image is 1080 pixels. It now shows the image that Facebook will display.
This time it posted to Facebook with the single featured image.
Fixing Open Graph Tags
Images is only one of the potential problems with sharing on Facebook. The main warnings you’ll see involve og tags. This means the meta tags that Facebook wants are missing. The easiest fix is by using a plugin such as Facebook Open Graph or Yoast SEO. This will ensure that the image you want to display is the same image that’s shared when others share your articles, and it will provide the og tags that Facebook wants.
This is Facebook Open Graph. It sets the og tags so Facebook will recognize them.
Yoast SEO includes a Facebook title, description, an image selection for each post under the Social tab.
The Sharing Debugger is an easy way to see what’s causing problems with your shares. It’s worth the extra effort to ensure your posts are formatted so they share correctly on Facebook. Well-formatted articles get more shares and engagement.
We’d like to hear from you. Have you used Facebook Debugger? Let us know about your experience in the comments below.
Featured Image via I000s_pixels / shutterstock.com
The post How to Use Facebook Debugger to Fix WordPress Links on Facebook appeared first on Elegant Themes Blog.