Hello I have started to optimizing my website with Facebook open graph and Twitter cards but when it comes to JomSocial there is no success because when I insert for example og:image property Facebook always render front page image I have set. It would be great if support for entering these tags would be possible for JomSocial. If not can you point me to where to insert these open graph properties so that social networks render what I want .
I need to point that this only happens with JS frontpage other JS related pages are displaying corectly content I have set up for Facebook open graph and Twitter properties.
Thank you!
Hi,
- I cant see jomsocial component on your website, please provide me the correct domain information
- You can debug the opengraph from here
opengraphcheck.com
, let me know what do you get
thank you!
Thank you Dimas, for now I have disabled JomSocial on my site, as I need to correct few things concerning it.
I will let you know if this happens after I re enable it again in the future.
Sure, just let us know if you still have the questions.
Hello Dimas I have enabled JS again and here is screenshot of what is going on with meta properties
prnt.sc/gy8jhl
To be precise let me explain what I need.
For example for joomla articles meta I use following code in template override to generate correct Facebook property tags:
//opengraph
$document = JFactory::getDocument();
$document->addCustomTag('<meta property="og:url" content="'.JURI::current().'" />');
$document->addCustomTag('<meta property="og:type" content="article" />');
$document->addCustomTag('<meta property="og:title" content="'. $this->item->title .'" />');
$document->addCustomTag('<meta property="og:description" content="'. JHtml::_('string.truncate', $this->item->introtext, 155, false, false ) .'" />');
if ($article_image) {
$document->addCustomTag('<meta property="og:image" content="'. JURI::root().$article_image.'" />');
$document->addCustomTag('<meta property="og:image:width" content="1246" />');
$document->addCustomTag('<meta property="og:image:height" content="854" />');
}
Hi,
- This is bit tricky, you need add it manually from core code directly.. but for the solution maybe you can try this one
extensions.joomla.org/extension/perfect-open-graph-tags/
- I am not sure why the system put wrong meta, actaully if you check this from this page
opengraphcheck.com/
the meta should correct, right? like on this screenshot
prnt.sc/gy8jhl
thank you!
No, you are misunderstanding me Dimas, second part on that screenshot (
prnt.sc/gy8jhl
)are meta inserted by plugin for opengraph but on JS pages first meta loaded is in that first square of screenshot. And for meta to render as it should that auto loaded meta must be removed
Also if you test community here
www.jomsocial.com/community
results which facebook debugger gives are identical as on my site except title and desc naturally.
Here is the screenshot
prnt.sc/gyrmg3
and I can bet that if you insert some meta you will get same results as on my site. If you compare it to mine it is identical
prnt.sc/gyro8d
So how do we remove/change meta generated by JS or move them to second place so that meta generated from plugins is taken first? Basically problem is only in image it pulls.
Hi,
Please you open this file components/com_community/views/frontpage/views.html.php, find this code
CHeadHelper::setType('website', JText::sprintf('COM_COMMUNITY_FRONTPAGE_TITLE', $config->get('sitename')));
setType($type, $title, $description = null, $images = null)