Keyword

Add this button share the category not the item

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 3 weeks ago #111584 by stavroch
I use the default addthis share tool that k2 provide and when I share one item to facebook, it doesn't share the item but the category.

The shared link is xxx.com/category and not the xxx.com/category/item

How can I fix this?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
12 years 3 weeks ago #111585 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
Hello Stavros,

This is a bug from the share this tool. I dont think you add parameters to it, if I am not mistaken it only has some appearance settings.

If you are trying to adjust the social buttons just add <?php echo $item->link; ?> to it's data-href attribute.

Regards.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 3 weeks ago - 12 years 3 weeks ago #111586 by stavroch
in which file i have to edit and change with this code?
The code that I have on the parameter on share tools of k2 is

<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="www.addthis.com/bookmark.php?v=300&pubid=xxxx">text
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xxxxx"></script>
<!-- AddThis Button END -->

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
12 years 2 weeks ago #111587 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
I dont think you can edit this code, as I told you, you can only change the code for the facebook like button, the +1 button and the tweet this button.

Btw. are you using the latest version of K2?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111588 by stavroch
Yes I use the latest version of k2.

where is this code of facebook like button?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
12 years 2 weeks ago #111589 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
it's inside the item.php just search for facebook or fb

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111590 by stavroch
This is the code of facebook
<?php if($this->item->params->get('itemFacebookButton',1)): ?>
		<!-- Facebook Button -->
		<div class="itemFacebookButton">
			<div id="fb-root"></div>
			<script type="text/javascript">
				(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			</script>
			<div class="fb-like" data-send="false" data-width="300" data-show-faces="true"></div>
		</div>
		<?php endif; ?>

I can't see any href tag.

Where I have to put the <?php echo $item->link; ?> as you told me?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
12 years 2 weeks ago #111591 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
<div class="fb-like" data-href=" insert code here... "

With some googling you will figure out how to parameter your twitter and +1 button as well

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111592 by stavroch
I use this code
		<?php if($this->item->params->get('itemFacebookButton',1)): ?>
		<!-- Facebook Button -->
		<div class="itemFacebookButton">
			<div id="fb-root"></div>
			<script type="text/javascript">
				(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			</script>
			<div class="fb-like data-href="<?php echo $item->link; ?>"  data-send="false" data-width="300" data-show-faces="true"></div>
		</div>
		<?php endif; ?>

but it doesn't share the item.
It share again the category.

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111593 by stavroch
Any news?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
12 years 2 weeks ago #111594 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Add this button share the category not the item
If this didn't work you might have a problem with your og:titles,

Try one of the following
  • Disabling any SEO plugin you might have and see if that fixes the problem
  • Check your URL with Facebook Debugger
  • If you are using a template ask the template developer if it's framework is trying to manually OG titles

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111595 by stavroch
The problem was tested without installing any seo plugin.
On the Facebok Debugger I didn't get any error.
I paste the url to facebook page and the item was imported to my wall, with the right url.

Also I have already ask the joomlart if they know about this issue.

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

  • stavroch
  • stavroch's Avatar Topic Author
  • Offline
  • Elite Member
More
12 years 2 weeks ago #111596 by stavroch
I test the site without the template and sh404 and again the addthis share the category and not the item.

How can I test it?

I have disable the plug ins that item has, but again the addthis sharing only the category and not the item.

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


Powered by Kunena Forum