Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Meta Property Facebook and Twitter for Image Profile (Avatar)

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

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

Moderators: beatnantkrileon
Powered by Kunena Forum