This information doesn’t have to be static. Here’s an example:
<meta property="og:title" content="<?php if ( is_single() ) { wp_title(); } else { bloginfo('name'); } ?>" />
<meta property="og:type" content="blog" />
<meta property="og:url" content="<?php echo get_permalink() ?>" />
<meta property="og:site_name" content="<?php bloginfo('name') ?>" />
Images are a little tricker. I like using the featured image if it’s available, personally. To do so, add this with your opengraph data:
<?php foreach (get_representative_images() as $image_url): ?>
<meta property="og:image" content="<?php echo $image_url ?>" />
<?php endforeach; ?>
… and add this to your theme’s functions.php…
function get_representative_images() {
global $post;
$images = array('http://www.your.com/default/image.jpg');
if ( has_post_thumbnail($post->ID) ) { // check if the post has a Post Thumbnail assigned to it.
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail');
array_unshift($images, $image_url[0]);
}
return $images;
}
Cheers~