facebook share

Professional Business Joomla template for corporate and business websites suitable for showing stock quotes, up to date news, portfolio management resources or international market data.
GK User
Tue Sep 10, 2013 2:55 pm
Hi i use finacial business template with k2 component

my site is http://www.kerkyrain.gr and i have addthis plugin for sharing facebook
i notice that share doesnt work right and doesn't take the right image...i search to code for meta tag og for open graph but nothing....then i install plugins for open graph with no luck...


any idea what i suppose to do?

thanks in advance
User avatar
Fresh Boarder

teitbite
Tue Sep 10, 2013 3:16 pm
Hi

Looks like it's a conflict or a wrong code. Please uninstall all extra facebook extentions You've used. Leave just the code You've put in K2 social field, but check if one more time with a code from facebook app generator: https://developers.facebook.com/docs/re ... gins/like/
User avatar
Moderator

GK User
Tue Sep 10, 2013 3:31 pm
thanks , but i have not use the social in k2...i am new with sharing on facebook..i for lot of days i am trying to figure out the problem...i must put addthis code in k2 social field?

thanks a lot
User avatar
Fresh Boarder

GK User
Tue Sep 10, 2013 3:40 pm
in addition what about og meta tag? can i insert code (dynamically ) take the url and image of article?
User avatar
Fresh Boarder

teitbite
Wed Sep 11, 2013 4:27 pm
Hi

OG is being constructed from Your content. Can You please tell me than what option are You using for fb shearing ? There are couple of them: provided by template, provided by K2, provided by You in a custom social shearing box. Whatever You use than rest of the options needs to be disabled to not cause conflicts.

If You want to use sharethis code than I advice to disable any shearing options in template settings and K2 parameters, than the code You will enter to K2 custom social code will be in charge.
User avatar
Moderator

GK User
Wed Sep 11, 2013 4:35 pm
i use addthis code for sharing and in k2 categories i have disable the section of social.

i dont know i notice that my site not generate og meta tags..
As you tell me i uninstall all plugin for facebook or open graph

in template parameters i have facebook id

i do something wrong?

thanks a lot i appreciate for your help
User avatar
Fresh Boarder

teitbite
Fri Sep 13, 2013 2:17 am
Hi

K2 should be using it's own system for that. I mean the articles are build the way that og elements are easily recognised and doesn't need to be extra specified, but You can do this of course by adding this code to /html/com_k2/default/item.php

Code: Select all
$template_config = new JConfig();

$cur_url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$cur_url = preg_replace('@%[0-9A-Fa-f]{1,2}@mi', '', htmlspecialchars($cur_url, ENT_QUOTES, 'UTF-8'));

$doc = JFactory::getDocument();
$doc->setMetaData( 'og:title', $this->item->title );
$doc->setMetaData( 'og:type', 'article' );
$doc->setMetaData( 'og:url', $cur_url );
$doc->setMetaData( 'og:image', $this->item->image );
$doc->setMetaData( 'og:site_name', $template_config->sitename );
$doc->setMetaData( 'og:description', '' );
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.