adding open graph metatags to head
The drupal 7 Metatags module has built-in Facebook opengraph support as an add-on module. If your specific metatag is not covered, the Meta tags module allows you to add it manualy. 

Although not recommended, if you need custom code for specific pages, you may use the theme's preprocess hook. For example, here is the one I wrote on the preprocess-page.inc file on the preprocess directory of my Omega sub-theme (for other themes, you may need to write the code in a hook_preprocess_page function on template.php):

&lt;?
  // Add og:title and og:description for the front page
  if($vars['is_front'] == TRUE){
    $element = array(
      '#tag' =&gt; 'meta',
      '#attributes' =&gt; array(
        "property" =&gt; "og:title",
        "content" =&gt; t("Druvision - Drupal News"),
      ),
    );
    drupal_add_html_head($element,'og_title');

    $element = array(
      '#tag' =&gt; 'meta',
      '#attributes' =&gt; array(
        "property" =&gt; "og:description",
        "content" =&gt; t("Druvision is a team of web solution experts focused on enterprise systems, open source development, responsive design and Drupal project management."),
      ),
    );
    drupal_add_html_head($element,'og_description');
  }

  // Add og:image
  global $base_url;
  $img =  $base_url.base_path() . drupal_get_path('theme', 'MYTHEME') . "/logo.png";
  if($vars['is_front'] != TRUE){
    if(isset($vars['node']-&gt;field_image['und'][0]['uri'])){
      $img = file_create_url($vars['node']-&gt;field_image['und'][0]['uri']);
    }
  }
  $element = array(
    '#tag' =&gt; 'meta',
    '#attributes' =&gt; array(
      "property" =&gt; "og:image",
      "content" =&gt; $img,
    ),
  );
  drupal_add_html_head($element,'facebook_share_image');
?&gt;


Note: The question is old, but I've found it in search so other people are looking for it, so I answer it for the completeness of this thread.