ShareThis Support for Developers

The ShareThis browser button allows users to share videos and pictures from select sites, in addition to any webpage URL. Users can share to contacts from MySpace, Facebook, AIM, e-mail, as well as CSV address lists, via one convenient address list.

The ShareThis API (STAPI) is for advanced use when you plan to:

  • Share something more than just a single web page (e.g. image, video, etc.)
  • Change the default object properties
  • Share multiple objects on a single web page

If you do not need these advanced capabilities, we suggest you use the standard website configuring tool or the ShareThis WordPress plugin.

Object Properties

Shared objects closely follow the structure of the Entry element as specified by the hAtom microformat (see http://microformats.org/wiki/hatom for more information). Shared objects, like feeds, are often viewed without the context of a web page, so be descriptive.

Since we don't know the encoding of your web page, we have to ask that all strings be encoded in utf-8. Click here for a script to make your strings utf-8 safe.

Below is the supported list of user assignable properties for a shared object.

title:(required) utf-8 string, defaults to document.title
url:(required) fully qualified URL, defaults to document.URL
summary:(optional) utf-8 string, defaults to null
content:(optional) utf-8 string, defaults to null
icon:(optional) fully qualified URL, defaults to Alexa thumbnail of url
updated:(optional) ISO 8601 date, defaults to document.lastModified
published:(optional) ISO 8601 date, defaults to null
author:currently not implemented
category:currently not implemented

Note: The content attribute is embedded in share messages where possible (i.e. email, web page). If you use this attribute make sure it is embeddable.

JavaScript Elements

JavaScript array elements are used to provide greater control of the behavior of the button and/or widget. The elements must placed in brackets immediately after the object definition. The following are the available ShareThis JavaScript elements:

button: create a customized ShareThis button and/or label for any object or page to be shared
popup: launches the widget in a new window rather than an iFrame
embeds: allows embedded elements to be seen while iFrame is loading
onclick: allows for execution of a custom function when button is clicked
offsetTop: changes the vertical positioning of the ShareThis widget in relation to the button link
offsetLeft: changes the horizontal positiong of the ShareThis widget in relation to the button link

Click this link to begin using:

ShareThis API (STAPI)

Other Resources