New Twitter Extension for BlogEngine.net Allows For Quick Tweeting

by Chris Saturday, July 25 2009

I recently came across a great Twitter extension for BlogEngine.net that allows for quick tweeting of a post. The name of the extension is ReTweet, and the original author, Krishnan, has posted the code and an installation walk-thru on his blog, located here. The extension even includes functionality for automatic shortening of the URL through bit.ly. VERY nice.

It works very well, with one exception. It fails to URL encode the title of the post, so if you use an ampersand (&), for example, it truncates the rest of the tweet.

If you are going to use it, I suggest making the following change to the code source file (retweet.cs):


Line 108:  string retweet = "http://twitter.com/home/?status=RT+@" + twitterUser + " " + System.Web.HttpUtility.UrlEncode(title) + "+-+";


I must note that, while we do use ReTweet on our blog, we have stripped-out the other features (delicious and DotNetKicks) so that it only displays the Twitter function.

If you have any questions regarding this post, feel free leave a comment and I will get back to you.

 

In order to actually see the ReTweet option, you must view an individual post. For an example, click here.


UPDATE - 7/26/09: Recently made an update to allow for tracking bit.ly short URLs with Google Analytics. See it here.



Tags: , ,

ASP.net

Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



About this Blog

This is a blog about web design and all things that are related to web design. Pertinent and relevant comments and/or questions are highly encouraged, but please be courteous and thoughtful of others whilest making comments.

If you have benefited from a post, please do the right thing and promote it. You can do this by linking to it, tweeting it, or digging it.

Thank you much.

Recent Comments

Comment RSS