I'm not sure what exactly is rendering in the head that pushes your meta tags so far down, nor have I seen this being an issue (except the "rule of thumb" which says to place meta tags as high as possible in the HEAD
).
In any case, you might try this:
<reference name="head">
<block type="catalog/product_view" name="product.opengraph" before="-">
<action method="setTemplate">
<template>socialtag/opengraph_product.phtml</template>
</action>
</block>
</reference>
Notice the before="-"
attribute. This will get picked up during block generation (see Mage_Core_Model_Layout::_generateBlock
) and inserted at the top of the parent block's stack (see Mage_Core_Block_Abstract::insert
).
Unfortunately, this alone will not solve your problem, as the stock Magento head template does not render its children in a sorted order. So you will have to override this template yourself and force the sort flag.
To do this, change the head template via layout XML:
<reference name="head">
<action method="setTemplate">
<template>your/module/head.phtml</template>
</action>
</reference>
And in that template render your child HTML like so:
<?php echo $this->getChildHtml('', true, true) ?>
Where the third argument is the sort flag which tells the block to render its children according to your managed order. This will get your block at the top.
On a side note, because you will have to go through all of this trouble anyway to extend the head template, you might also want to bump up the child rendering up near the top of the template (above your CSS/JS).
BONUS:
Why are you leveraging the catalog/product_view
block? See this extension for a good boilerplate to compare your code with: https://github.com/thaddeusmt/magento-fb-opengraph/ -- their implementation covers OG tags beyond just products.