I've actually been searching on this site for the answer to this question for quite some time. Looking for a way to 'echo/print' multiple og:images for facebook. What I have here used only 'the_post_thumbnail'
function fb_image() {
if (is_single()) {
global $post;
$feature_image = get_the_post_thumbnail($post->ID);
$doc = new DOMDocument();
$doc->loadHTML($feature_image);
$imageTags = $doc->getElementsByTagName('img');
foreach($imageTags as $tag) {
$image_url = $tag->getAttribute('src');
}
}
?>
<meta property="og:image" content="<?php echo $image_url; ?>" />
<?php }
add_action('wp_head', 'fb_image');