0 Comments

3rd Time is a Charm

Okay, that failed.  I have now left the function.php file alone and instead edited the Twitter Tool plugin itself following this example. $ch = curl_init(“http://api.bit.ly/shorten?format=xml;version=2.0.1&login=USERNAME& apiKey=APIKEY&longUrl=”.get_permalink($post_id)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, 0); $data = curl_exec($ch); curl_close($ch); $xml = new SimpleXmlElement($data, LIBXML_NOCDATA); $bitly = $xml->results->nodeKeyVal->shortUrl; $url = apply_filters(‘tweet_blog_post_url’, $bitly);  

0 Comments

Twitter Tool to Enable Bit.ly Short URL

I’ve been trying to figure out how to use Bit.ly to create a URL for my Tweets using the Twitter Tools Plugin.  This here is a test to see if the mods I did to the function.php file in my theme is successful following the instructions here.