
Fix open graph issue with K2 and OG protocol by Codeboxr
By:
manchumahara on
Jan 5th, 2013 | syntax:
PHP | size: 0.87 KB | hits: 61 | expires: Never
//Go to(windows style path) joomla root\components\com_k2\views\item , open file view.html.php
// and comment line from 445 to 455
/*
$document->setMetaData('og:url', $uri->toString());
$document->setMetaData('og:title', htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8'));
$document->setMetaData('og:type', 'Article');
$facebookImage = 'image'.$params->get('facebookImage', 'Small');
if ($item->$facebookImage && JFile::exists(JPATH_SITE.$item->$facebookImage))
{
$image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $item->$facebookImage);
$document->setMetaData('og:image', $image);
$document->setMetaData('image', $image);
}
$document->setMetaData('og:description', htmlspecialchars(strip_tags($document->getDescription()), ENT_QUOTES, 'UTF-8'));
*/