Skip to Content Skip to Menu

🏖 Summer has arrived! Start your summer right with our summer sale!Get 30% off Now!

Meta Property Facebook and Twitter for Image Profile (Avatar)

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

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

Moderators: beatnantkrileon
Powered by Kunena Forum