- Posts: 295
COMMUNITY FORUM
Add this button share the category not the item
- stavroch
-
Topic Author
- Offline
- Elite Member
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
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
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
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
where is this code of facebook like button?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- stavroch
-
Topic Author
- Offline
- Elite Member
- Posts: 295
<?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
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
<?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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
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
-
Topic Author
- Offline
- Elite Member
- Posts: 295
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.