TweetMeme Button

The Retweet button is for website and blog publishers that want to encourage their audience to retweet their content on twitter.

We have made our button really smart, with one simple piece of JavaScript we can give you up to date tweet counts and shorten your title and link for the retweets. Best of all it will work on any web page, anywhere!

The Code

Copy and paste the following code where you want the button to be displayed.

<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Options

When the URL is different from the current URL

The button will automatically grab the URL of the page it is placed on. However if you want to place the button on more than one page or would like it in your feed, you will need to override the URL.

<script type="text/javascript">
tweetmeme_url = 'http://yoururl.com';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Just replace http://yoururl.com with the URL of the page you want to retweet. The URL must be the final destination URL, not an alias, such as a link using a shortening service (eg. Bit.ly).

Changing the size of the button – Compact Button

The Compact=
The Compact Button

We also offer a compact version of the TweetMeme button, with the same options as the larger button.

<script type="text/javascript">
tweetmeme_style = 'compact';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>


Changing the @username who is tweeted

By default the retweet button will be in the format of “RT @tweetmeme <title> <link>”. You can, however change the button to retweet your user account. By specifying the ‘tweetmeme_source’ parameter in the JavaScript you can change the format to “RT @yourname <title> <link>”.

<script type="text/javascript">
tweetmeme_source = 'tweetmeme';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

The example above would retweet in the format of “RT @tweetmeme <title> <link>”.

Changing the URL Shortener used

We have also added the ability to use a URL shortener of your choice instead of our default one.  If you would like to do this then you need to include the “tweetmeme_service” parameter as shown below:

<script type="text/javascript">
tweetmeme_service = 'bit.ly';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Note: tweetmeme_service should be set to the name of the service you want to use.  For some services you also need to include the service API – Please see the example below for this.

<script type="text/javascript">
tweetmeme_service = 'awe.sm';
service_api = '12345678910';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: