Tag Archives: wordpress

Hacking TweetMyBlog (TwitterFeed Sucks)

I used to use TwitterFeed; but recently it’s been a real pain in the ass and not updating so I looked for an alternative.

Roll on TweetMyBlog.

TweetMyBlog is great for the simple fact that it is a WordPress plugin. It’s also a small download, and you can install it very easily. However, TweetMyBlog is hard-coded to use TinyURL and the URL it “makes tiny” is an affiliate link taking the user to a framed page. This is a bit of a bummer for me because I like to use bit.ly and I don’t really want my users going to some 3rd party site.

Roll on TweetMyBlog Hack

I took at a look @ the files and realise we can very easily change the Plugin to use bit.ly instead of TinyURL using the bit.ly API.

If you have installed TweetMyBlog you would have uploaded the “tweetmyblog” directory which had 3 files in it. Go and find, “twitter_api.php”:

and at the very bottom of the file you will see:

function get_tiny_url($url)
return $this->snoopy->results;

As you can see, it uses TinyURL.

I’ve only hacked it to use bit.ly, but this is what I changed it to first (don’t copy it yet, there’s a better version further down):

   function get_tiny_url($url)
	 return $this->snoopy->results;

I gave it a shot, and sure enough it worked, I was using bit.ly instead of tinyurl, result! However, it was still using the silly Affiliate link with a frame & 3rd party site.

Okay, open “tweetmyblog.php” at around line 36 you will see:

$tweet = trim($tweetPrefix).' '.$blogPost->post_title.' '.$t->get_tiny_url('http://www.tweetmyblog.com/bpredir.php?r='.$tmb_affid.'&bp='. urlencode(get_permalink($postID)));

The problem is the tweetmyblog.com redirection, so I replaced it with this:

$tweet = trim($tweetPrefix).' '.$blogPost->post_title.' '.$t->get_tiny_url(urlencode(get_permalink($postID)));

Easy, right?

Well, this works great.

I do not need to use TwitterFeed ever again because WordPress automatically Tweets my blog post! I don’t have to wait 30 minutes, 1 hour, 5 hours for TwitterFeed to notice my blog post.

There was one last change that I made; after using the code above (using the bit.ly api) I realised that the URL wasn’t showing up in my bit.ly history. I checked this out and realised I needed to use the history=1 parameter. After I added this I’ve not had a single problem at all.
For the final code of “twitter_api.php”, see below:

function get_tiny_url($url)
	 return $this->snoopy->results;

I must say though; TweetMyBlog is a great plugin by John Merrick and Sean Jordansen and you should install it.

If you wish to monetise your tweets from your blog, then the above edits are silly. It’s just personally I would rather not have the user taken to a 3rd party site.

TweetMyBlog also provides a feed of your Tweets as a Widget, so it really is great!

Download TweetMyBlog now!


My 7 Must-Have Plugins for WordPress

I make sure I use these on ALL my WordPress blogs. I use many more, but this is a list of plugins that I think anyone who is serious about maximising the potential of their blog should be using.

All in One SEO Pack
Google Analytics for WordPress
Google XML Sitemaps
Add to Any: Share/Bookmark/Email Button

If you have others that you believe are essnetial and should be mentioned then leave a comment and I shall consider updating this list.


Add some more Plugins and Signup To Google Analytics

Providing you’ve completed the earlier steps on getting into Google in just 72 hours, then by now I would imagine you’re tweeting away whilst blogging about your niche.

It’s simply impossible for me to mention every that you can do to promote your site; but I’m trying to help you in the best way I can.

Next stop: Must-have WordPress PluginsUsing Google Webmaster Tools & Signing up to Google Analytics.

The wordpress plugins in the link above are not necessarily essential, but they will help get your site out in the open, and grab some more traffic in addition to helping your site rank in the search engines. A real must-have though is the google analytics plugin; In fact I’d go as far as saying it should be one of the first things you do to your WordPress installation.

Checkout the links above to upgrade your Internet life!


Blog Up and Running

It’s 9:30pm and didn’t get any chance to get on here yesterday either. I play football in my local 6-a-side league! We won 1-0 which keeps us in 3rd place!

Right got a a lot to do. Shall update once I’m done.

Okay. Done. I’ve managed to get this stuff out of the way:

Changed nameservers of bobbyjason.co.uk
Created a hosting account on my server for bobbyjason.co.uk
Installed wordpress
Spent a while trying to set up the “mail to blog” function in wordpress (new to me…)


Okay, gave up on that – I shall write a post about it once I have it working.
Installed WordPress plugins, the All-In-One SEO pack, and the WP-Cache.

It’s now 00:03 on the 14th, so I’m going to try TwitterFeed and publish this post!

Created an OpenID account so that I could sign up to TwitterFeed, registered a feed with them and linked to to my bit.ly account!

Lets see!

3 hours well spent.