Modifying Tweetme: replace bit.ly by microuri.com

This was a quick modification to use use MicroUri, instead bit.ly on Tweetme plugin. We just need to change a function called tweetme_bitly_link().

 
function tweetme_bitly_link($id) {
 
	if (function_exists('revcanonical_shorten') &&
                                $link = revcanonical_shorten($id)) {
		return $link;
	} else {
		$link = get_permalink($id);
               /**Williams Mendez **/
	$ob = @simplexml_load_file('http://api.microuri.com/get.php?url='.$link);
	if(is_object($ob) && isset($ob->Response) && strlen($ob->Response))
	return $ob->Response;
		return file_get_contents('http://bit.ly/api?url=' . $link);
	}
}
 

Note: This url shortening and wordpress hack is provided by Williams Mendez.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]