Meta Property Facebook and Twitter for Image Profile (Avatar)

10 years 2 months ago - 10 years 2 months ago #239843 by Trony
Hello.
I've Joomla 2.5 and Community Builder 1.9.1
Sometimes when i share my Personal Profile on Facebook, it's keep the wrong image so i added the relative meta property on file:

components -> com_comprofiler -> plugin -> user -> plug_cbcore -> cb.core.php

after the line 2824 (Dreamweaver) i added:
$doc = JFactory::getDocument();
$doc->addCustomTag ('<meta property="og:image" content="' . $imgUrl . '"/>');
$doc->addCustomTag ('<meta name="twitter:image" content="' . $imgUrl . '"/>');
$doc->addCustomTag ('<link rel="image_src" href="' . $imgUrl . '"/>');	

Twitter Image it's an optional.

I hope it's a good work. I checked in with Facebook Linter and now it 'see' the right Image of Avatar.

Regards.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.155 seconds

Facebook Twitter LinkedIn