billcurley:
Hmmmm, well any idea where Facebook is pulling the information from? I would like to edit which of the photos it scrolls through, the code has to be somewhere because FB doesn't just randomly attach such previews
Stick the below in bold inbetween the other tags in your html_header.php file, and that will make it pull the correct info, tags and image from any page on your site.
<title><?php echo META_TAG_TITLE; ?></title>
**<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; ?>" />
<?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 == 'stickadefaultimagehere') { // if no products image, use the default image if enabled
$fb_image = '';
}
if ($fb_image != '') {
?>
<meta property="og:image" content="<?php echo $fb_image; ?>" />
<?php
}
?>**
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="" />