Quick Tip: Gain More Traffic for Blog Using Tweetmeme and Su.pr

written by aext on June 8, 2010 in CSS & HTML and Quick Tips and WordPress with 25 comments

Some guys asked me how I did with the Tweetmeme button which using the Su.pr URL shortener. Su.pr is a service of Stumbleupon, a very popular social network, which helps people share the web content together. It’s pretty easy to integrate Tweetmeme and Su.pr and this is how I did.

You can use Tweetmeme with: bit.ly (very popular), awe.sm… but I think the best choice for your blog is Su.pr. With Su.pr shortener, your short links will have an useful top sharing bar which users can vote(give thumb-ups) and add reviews to your links. The more thumb-ups your link got, more popular your link will be on StumbleUpon.

Integrating Su.pr URL shortener to Tweetmeme button is really easy. You might don’t care about this, but if you give it a try, you can gain more (I mean a lot) of traffic from Stumbleupon.

This is how Tweetmeme button works (I’m not talking about Tweetmeme plugin for WordPress):

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

However, if you are using the URL shortener that supports only with API, you need to request the service API key(Su.pr is a API support URL shortener).

1- Get the Su.pr API key:


Login to http://su.pr with your Stumbleupon account. Then navigate to the Settings page to get your API key(already generated by default):

supr api key generation

2- Customize the Tweetmeme button:


After you got your key for API using, you will need to customize the Tweetmeme button which requires the service name and service API to generate short URL for Su.pr.

The complete code to make Tweetmeme works with Su.pr URL shortener is (WordPress version):

<script type="text/javascript">
tweetmeme_url = '<?php the_permalink() ?>';
tweetmeme_source = '[You Twitter ID is here if you want to]';
tweetmeme_service = 'su.pr';
tweetmeme_service_api = '[your API key is here]';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Result:

tweetmeme url shortener with su.pr

It’s quite easy, right? From now on, your re-tweet button will use the Su.pr URL shortener to get more traffic from Stumbleupon. Maybe you don’t like the top share bar in your short URL but the more thumb-ups, more popular your link will be. You make a call!

Updated: For whom using Tweetmeme plugin for WordPress(thanks David ), add this code to tweetmeme.php file (below of line 337):

<option <?php if (get_option('tm_url_shortner') == 'su.pr') echo 'selected="selected"'; ?> value="su.pr">su.pr</option>

Then enter your API key in the field – ‘URL Shortener API Key’ on the settings page.

Note: if you update the plugin, this may need to be added again…