Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

print url in fb share button


Reply


364 Views

Avatar
thomas.paulson

Community Member, 81 Posts

13 March 2014 at 8:28pm

I have a product listing page based on product type like the below.

-url-/products/type/Tyre Changer/?category=2

I want to share the above link to FB, I tried print url using {$AbsoluteLink}, but print only -url-/products/.

share.ss
-------------
<div id="fb-root"></div>
<script>(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-share-button" data-href="{$AbsoluteLink}" data-type="button_count"></div>