Technology, Smartphones, Games


Retweet delious and kick it buttons in post - extension for blogengine.net

Just wrote an extension for blogengine.net, it will add 3 buttons just after the post content which will be

1. A re-tweet button

2. A dot net kicks kick it button

3. A delicious book marking button

You can use bit.ly or tinyurl for making the short url. If you are planing to use bit.ly you need to have an account in bit.ly and a bitl/y Api Key.

To use,

1. download the zip file and unzip it

2. open the retweet.cs

3. Just edit the first few lines (Hope that the comments are enough)

Code Snippet
  1. private static int bitly = 0; // 1 for bit.ly and 0 for tiny Url
  2.     private static string bitlyUserName="bitlyUserName"; //If you are using bit.ly to shorten URL
  3.     private static string bitlyApiKey = "R_";//If you are using bit.ly to shorten URL the API KEY
  4.     private static string activateHistory = "1"; //0 or 1 If you are using bit.ly to shorten URL
  5.     private static string retweetimageUrl = "http://..../retweet.png"; // image you need to show as retweet button
  6.     private static string deliciousimageUrl = "http://...../delicious.jpg"; // image you want to show as a delicious button
  7.     private static string twitterUser = "krishnans"; // Your twitter user name will be used in the retweet

4. Move the edited to App_Code/Extensions/

4. there two images too , which you may or may not use (they are one for re-tweet button and another for delicious button)

do not forget to change that twitter user name currently it is mine.

You can see this working on this blog.

Edit:

Received a mail from Chris 

Firstly, thanks for the retweet extension, very nice. I just wanted to make you aware that the title should be url encoded to avoid breaking the functionality. I made a minor update to reflect this change, and I would like to post it as a comment, but alas, comments are closed. :(

Changed line: 108

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

Cheers,

Chris

 

here is the file to download

retweet.zip (11.85 kb)