This is my problem: when I comment an image with Facebook Comments in my FB page doesn't appear the right image thumbnail but another image
My Joomla version is 1.5.25, Phocagallery version 2.8.1.
Pippo.


Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#"
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >Code: Select all
// ASIGN
$this->assignRef( 'tmpl', $tmpl );
$this->assignRef( 'commentitem',$commentItem);
parent::display($tpl);Code: Select all
// ADD FACEBOOK META PROPERTIES
$document->addCustomTag('<meta property="og:image" content="http://'.$_SERVER['HTTP_HOST'].'/'.$item->linkthumbnailpath.'"/>');
$document->addCustomTag('<meta property="og:type" content="article"/>');
$document->addCustomTag('<meta property="fb:app_id" content="'.$tmpl['fb_comment_app_id'].'"/>');
Code: Select all
$document->addCustomTag('<meta property="og:image" content="http://'.$_SERVER['HTTP_HOST'].'/'.$item->linkthumbnailpath.'"/>');
$document->addCustomTag('<meta property="og:type" content="article"/>');
$document->addCustomTag('<meta property="fb:app_id" content="'.$tmpl['fb_comment_app_id'].'"/>');
Code: Select all
$document =& JFactory::getDocument();
$document->addCustomTag( '<meta property="og:image" content="'.JURI::base().$item->linkthumbnailpath.'"/><meta property="og:type" content="article"/><meta property="fb:app_id" content="'.$tmpl['fb_comment_app_id'].'"/>' );

Code: Select all
$document =& JFactory::getDocument();
$document->addCustomTag('<meta property="og:type" content="article"/>');
$document->addCustomTag('<meta property="fb:app_id" content="'.$tmpl['fb_comment_app_id'].'"/>');
$document->addCustomTag('<meta property="og:image" content="http://'.$_SERVER['HTTP_HOST'].'/'.$item->linkthumbnailpath.'"/>');Code: Select all
$item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');