Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question
    
Not sure why I was down voted twice. I can't install plugins, so how do I update meta tags? –  Jack Marchetti Mar 4 '12 at 6:16
    
Flagged as »not constructive« This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. –  kaiser Mar 5 '12 at 0:58
    
WordPress - Stack Exchange is for WordPress developers and administrators. If you cannot touch the code your question is probably off topic. –  toscho Apr 7 '12 at 21:22
add comment

closed as off topic by Chris_O, kaiser, toscho Apr 7 '12 at 21:22

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

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

share|improve this answer
    
how do I install plugins? –  Jack Marchetti Mar 4 '12 at 6:16
add comment

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/

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.