Skip Main Site Navigation

AddThis

URL & Title

By default, AddThis will use the URL and title of the page being viewed. You can however specify a different URL and Page Title for AddThis to use instead.



Optional Attributes

addthis:url Optional
URL to use if not the current page. This is helpful when you have an AddThis button on multiple articles on the same page.
addthis:title Optional
This is an alternate title.
addthis:description Optional
This is an alternate description.



HTML Code Example

Button

This example uses Example.com:

<a href="http://www.addthis.com/bookmark.php" 
      class="addthis_button"
      addthis:url="http://example.com"
      addthis:title="An Example Title"
      addthis:description="An Example Description"></a>

Choose Favorites and look at the page title:

Share

Toolbox

This example again uses Example.com, but sets the URL, Title, and Description for all service elements within the AddThis toolbox:

<div class="addthis_toolbox addthis_default_style "
       addthis:url="http://example.com"
       addthis:title="An Example Title"
       addthis:description="An Example Description">
<a href="http://www.addthis.com/bookmark.php?v=250&pubid={YOUR_PROFILE_ID}" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
 <a class="addthis_button_preferred_1"></a>
 <a class="addthis_button_preferred_2"></a>
 <a class="addthis_button_preferred_3"></a>
 <a class="addthis_button_preferred_4"></a>
 </div>

Hover over Share, choose "Favorites" and look at the page title:

Share |

This example again uses Example.com, but sets the URL, Title, and Description for only the Facebook service element within the AddThis toolbox:

<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&pubid={YOUR_PROFILE_ID}" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
 <a class="addthis_button_facebook"
       addthis:url="http://example.com"
       addthis:title="An Example Title"
       addthis:description="An Example Description"></a>
 <a class="addthis_button_tweet"></a>
 <a class="addthis_button_preferred_3"></a>
 <a class="addthis_button_preferred_4"></a>
 </div>

Choose Facebook and observe the shared URL, then choose Tweet, and see that the defaults have instead been used:

Share |




API Reference

Check out the full client API specification to learn more.