Youjoomla Support Forums (http://www.youjoomla.com/joomla_support/index.php)
-   Your Sites (http://www.youjoomla.com/joomla_support/forumdisplay.php?f=32)
-   -   Suggested mod to include Facebook OG properties (http://www.youjoomla.com/joomla_support/showthread.php?t=11796)

adiehm 11-01-2013 08:36 PM

Suggested mod to include Facebook OG properties
 
I have used YGSG as the base template for a few website now and I thought I would share a mod that I incorporate.

This mod will append all the OG parameters that Facebook requires and lets you manipulate the default facebook like image

File : yjsg_head.php
Location in the file : Right at the bottom before the php close tag "?>"
Code to insert :

$mydoc2 =& JFactory::getDocument();
$title = $mydoc2->getTitle();
$description = $mydoc2->getDescription();
$document->addCustomTag('<meta property="og:image" content="'.$yj_site.'/images/system/facebook-like.jpg" />');
$document->addCustomTag('<meta property="og:url" content="'.JURI::base().'?view=featured" />');
$document->addCustomTag('<meta property="og:title" content="'.$title.'" />');
$document->addCustomTag('<meta property="og:description" content="'.$description.'" />');


You have to add your default facebook image (facebook-like.jpg) in the following folder:
/tempales/yougrids/images/system/facebook-like.jpg.

You can test the results in the facebook developers site:
https://developers.facebook.com/tools/debug

Hope this helps someone :)

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 3.x

MySQL Version: 5.x

PHP version: 5.x

Link to installation: JTAA - Community Consultation - Stakeholder Engagement

Have you edited any files? If yes tell us which ones.: Yes

Is this personal or client website?: Client

mukul11 11-04-2016 08:12 AM

You can get a help from this link



--------


All times are GMT -4. The time now is 09:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.