Hi,
I get this error when I click the Like Button.
Code:
Your page's type requires that a meta tag of the form <meta property="og:image" ...> be present.
I may have misses some code, although I was careful I had to paste in the altered code because of my previous changes to those files.
I did place this in the html_header.
Code:
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?> xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title><?php echo META_TAG_TITLE; ?></title>
<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="" />
<meta name="generator" content="" />
<meta property="fb:admins" content='nadixxxxxxx' />
<meta property="fb:app_id" content='13260628xxxxxxx' />
<meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
<meta property="og:site_name" content="<?php echo TITLE; ?>"/>
<meta property="og:image" content="<?php echo META_TAG_FBIMG; ?>"/>
<meta property="og:url" content="<?php echo $canonicalLink; ?>"/>
<meta property="fb:admins" content="13260628xxxxxx"/>
<meta property="og:type" content="product"/>
And I modified the modules/meta_tags.php to add the p.products_image Like so:
Code:
//added p.products_image for facebook opengraph / like button
$sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id, p.products_image,
p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,
p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,
pd.products_description, p.product_is_free, p.product_is_call,
mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
as well as the:
Code:
// CUSTOM META TAGS
if($product_info_metatags->fields['products_image']!='') {
$FBimgURL = (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . DIR_WS_IMAGES . $product_info_metatags->fields['products_image'];
define('META_TAG_FBIMG', $FBimgURL);
} else {
define('META_TAG_FBIMG', '');
}
define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name'])));
} // EOF
Then added the Like button to tpl_product_info_display.php:
Code:
<!-- bof Facebook Like Button -->
<p><fb:like></fb:like></p>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '13260628xxxxxxx', status: true, cookie: true,
xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
// Do something, e.g. track the click on the "Like" button here
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<!-- eof Facebook Like Button -->
But I still get the error when I click the like button.
Any thoughts?
Nadia