Facebook share

Our themes come with a share section which includes Facebook, Twitter, Google+ and Pinterest.

share post

 

When a visitor shares a post, the social network engine scans the page trying to retrieve certain elements like the post image, title, excerpt and author, etc. Sometimes the result may be inaccurate because the page structure can differ from page to page. To control this aspect each network provides a meta system, in the case of Facebook we have the Open Graph API. The procedure cannot be repeated on each share, to avoid this Facebook keeps the share data in a cache and periodically updates it.

Facebook Open Graph in our themes:

By default the themes don’t come with any og data. We decided not to add them because most SEO plugins come with such a feature. For best results we recommend using the WordPress SEO by Yoast plugin, the Facebook meta data can be enabled from SEO -> Social -> Facebook:

wordpress_seo_yoast_facebook_og

 

Each og meta will be automatically set, if you want to modify them, for example change the image shared on a certain post, you can doit from the post edit section, look for the Yoast SEO panel:

SEO by Yoast post section

 

Facebook share doesn’t display the post image:

If this issue occurs first check the size of the featured image, Facebook requires an image larger than 200 x 200 pixels.

facebook_share_no_image

 

When you share a post for the first time, the Facebook crawler will scrape and cache the metadata from the URL shared. The crawler has to see an image at least once before it can be rendered. This means that the first person who shares a piece of content won’t see a rendered image. A solution for this would be to use Facebook debugger to pre-fetch metadata for the page. You should also do this if you update the featured image on a post or you encounter issues when sharing the post. You can manually refresh the metadata for each post by pressing the “Fetch new scrape information” button:

facebook debugger

 

Facebook automatically updates the cached metadata after a certain period (24 hours is mentioned in their documentation).