I'm using the Wordpress CMS. I don't have access to the theme's code etc..
So how do I update the opeh graph tags? I'm mainly looking to add an image to go along with it, as it's using the default WordPress image when I share on Facebook.
Thanks!
I'm using the Wordpress CMS. I don't have access to the theme's code etc..
So how do I update the opeh graph tags? I'm mainly looking to add an image to go along with it, as it's using the default WordPress image when I share on Facebook.
Thanks!
Do you have access to (installing) plugins? There are several plugins that lets you add the Open Graph tags: http://wordpress.org/extend/plugins/search.php?q=open+graph
Here's the way I did after finding a solution via google. This seems to work an pulls an image based on the featured image set on a post. If it is a main page or a post/page with no featured image, there is a conditional statement which allows you to set a static image.
<!-- facebook integration -->
<meta property="fb:app_id" content="YOUR FACEBOOK APP ID" />
<meta property="fb:admins" content="YOUR FACEBOOK ADMIN CODE" />
<?php if (is_single() || is_author()) { ?>
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
<meta property="og:url" content="<?php the_permalink() ?>"/>
<meta property="og:title" content="<?php wp_title(); ?>" />
<meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<meta property="og:type" content="article" />
<meta property="og:image" content="<?php if (function_exists('wp_get_attachment_thumb_url')) {echo wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>" />
<?php } else { ?>
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
<meta property="og:url" content="<?php the_permalink() ?>"/>
<meta property="og:title" content="<?php wp_title(); ?>" />
<meta property="og:description" content="<?php bloginfo('description'); ?>" />
<meta property="og:type" content="website" />
<meta property="og:image" content="LINK TO IMAGE TO USE FOR THUMBNAIL HERE" /> <?php } ?>
Sorry, just noticed you said you didnt have access to the code. I guess a plugin is your only route. If you can get access to the header, you can try my code snippet above.
Yes, a plugin that can do it: http://wordpress.org/extend/plugins/facebook-open-graph-meta-in-wordpress/
And more info (another way of) doing this on this code route: http://www.wpbeginner.com/wp-themes/how-to-add-facebook-open-graph-meta-data-in-wordpress-themes/
og:
tags and does not need other tags to be correctly supported. Your example should not include fb:
tags. This is something Facebook needs for completely different purpose. You don't need to provide your Facebook application ID and secret code in order to be able to post to Facebook using Open Graph.