Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize URL in AddThis

Tags:

addthis

How can i access the URL generated in addthis and append a query string before it gets emailed to other persons?

Thanks

like image 658
Gopi Avatar asked Sep 25 '09 10:09

Gopi


1 Answers

From their site:

To define the URL to share you do it in one of four ways. For our newest tools, use the data-url and data-title parameters, like this:

<div class="addthis_sharing_toolbox" 
     data-url="THE URL" 
     data-title="THE TITLE">
</div>

If the code you're using has the addthis_toolbox in it, use the addthis:url and addthis:title parameters, like this:

<div class="addthis_toolbox addthis_default_style " 
     addthis:url="THE URL" 
     addthis:title="THE TITLE">

or you can set it using the addthis_share variable, which will change the URL and title shared for all the AddThis tools on the page:

<script type="text/javascript"> 
    var addthis_share = {    
        url: "THE URL"    
        title: "THE TITLE" 
   }
</script>

In any case, be sure to replace THE URL and THE TITLE with the URL and title of the pages to share.

like image 67
vitro Avatar answered Oct 04 '22 02:10

vitro