The following code inserted into the header.php passes off the thumbnail in the article.

if (is_home()) {
	echo '<meta property="og:image" content=""/>';
elseif (function_exists("has_post_thumbnail") && has_post_thumbnail() && !is_home() ) { 
	thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(post->ID), full ); ?>
<meta content="<?php echo $thumbnail[0]; ?>" property="og:image" />
<?php } ?>

Categories: PHPSoftware

1 Comment

Freemon SandleWould MonsterID Icon Freemon SandleWould · April 30, 2013 at 5:55 am

Hey Banjo!  You do know you need to replace the default image link with your own right?  

Leave a Reply

Your email address will not be published. Required fields are marked *