Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Meta Property Facebook and Twitter for Image Profile (Avatar)

  • Trony
  • Trony
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
10 years 11 months ago - 10 years 11 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:
Code:
$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.
Last edit: 10 years 11 months ago by Trony.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum