Zombeck.com

You are here: Home » Software » Joomla » Adding a Retweet Button to your site

Adding a Retweet Button to your site

Add the following code to you index page

Get the official Retweet button to put on your website or weblog. Feel free to alter them and customize them for your site. Copy and paste the following code where you want the widget to be displayed.

<script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script>

The button has a brain of its own and will automatically grab the URL of the page it is placed on without you having to change a thing. However if you want to place your button on more than one page or would like it in your feed, you will need to override the URL by following the directions below.

<script type="text/javascript">
url = 'http://www.example.com/2009/08/example-blog-post';
</script>
<script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script>

Just replace http://www.example.com/2009/08/example-blog-post 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

We also offer a smaller version of the retweet button for you website and blog owners who prefer small and simple. The small button will fit anywhere so go crazy!

<script type="text/javascript">
size = 'small';
</script>
<script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script>

Specifying a different username

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

<script type="text/javascript">
username = 'mashable';
</script>
<script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script>

Last modified on Sunday, 29 August 2010 18:10
pic_RZ

Richard Zombeck

I am a blogger, web designer, and technical writer.

My work has been featured in: Huffington Post, The Hill, MSNBC, and Time.

This site is a portfolio of my work and the services I offer.

My Company website can be seen at www.FLADDAP.com

Contact Me:

Us the form at the bottom of the page or e-mail me at

info@zombeck.com

  • 1
  • 2
  • 3
Prev Next

Changing the Date and Time in Joomla 1.5

By default Joomla shows the date and time in the article. While this is,...

K2 Font Resizer Doesn't work on Intro

K2, while awesome is complicated and it's got a few things that are annoying. And...

Joomla Upload Limit

By default Joomla has an upload limit of 20 MB. A little slim for the...

Joomla: Changing Date and Time in Articles

By default the date and time show up in articles as Saturday, 14 November 2009...

Adding a Retweet Button to your site

Add the following code to you index page Get the official Retweet button to put on...

Print Article is Right Aligned

I noticed when I tried to print an article from one of the contributors at...

Adding Plugin Code to an HTML Module

Every time I get a special plugin that can add stuff to content, like ...

Contact Me

Fill out the form below and I'll get back to quickly.
Please fill in all the fields and don't forget the last one with the four digit number.

Don't forget to enter the four digit code in the spam field at the end. If you prefer to email me directly you can reach me at info[AT]zombeck[DOT]com






Join Me

facebook_64x64 linkedin_64x64 twitter_64x64 rss_64x64

Twitter

twitter Bird more info...!

Social Stuff