1

I'm using AddThis to render group of social media icons.

What I'm trying to achieve is to update the sharing URL only when the user clicks on any of the social media icons - this is crucial as I can't update the URL beforehand. I've tried jquery click function to update the url.

$(".addthis_sharing_toolbox").click(function () {
    theUrl = window.location.origin + currentStatus;
    addthis.update('share', 'url', theUrl);
});

I have also tried adding a listener

addthis.addEventListener('addthis.menu.share', addthisShare);

The problem with all of these is that they are run after addthis click event, therefore the sharing URL is not updated.

Any ideas how to solve it would be appreciated.

Grentley
  • 315
  • 3
  • 6
  • 19
  • 1
    I have a similar issue. Did you get to the bottom of it? – crmpicco Nov 25 '14 at 11:17
  • Unfortunately not. I've tried many options and none of them worked as I wanted it to work. I ended up creating my own sharing buttons. – Grentley Dec 02 '14 at 11:26
  • I ended up going down a different route, see http://stackoverflow.com/questions/27148711/automatically-shortening-url-for-email-facebook-shares-with-bitly-through-addthi . It shortens for Twitter, but not Email and Facebook. – crmpicco Dec 02 '14 at 11:31

0 Answers0