
Originally Posted by
dgent
Yes, add this code to your html_header.php
<meta property="og:title" content="<?php echo META_TAG_TITLE; ?>" />
<meta property="og:type" content="product" />
<meta property="og:site_name" content="<?php echo STORE_NAME; ?>" />
<meta property="og:fb_admin" content="your Facebook admin number if you're using FB insights" />
<?php
if (isset($_GET['products_id'])) { // use products_image if products_id exists
$facebook_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
$fb_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $facebook_image->fields['products_image'];
}
if ($fb_image == '') { // if no products image, use the default image if enabled
$fb_image = 'insert a default image url here';
}
if ($fb_image != '') {
?>
<meta property="og:image" content="<?php echo $fb_image; ?>" />
<?php
}
?>