Populating Twitter’s Text Field From Your Blog

July 31, 2009

OK people, bear with my excitement here please. When I spend DAYS trying to figure something out, and then I do it, I get ecstatic! I especially get crazy when it’s something simple (programmers will understand what I mean if they’ve ever had a tiny syntax error keeping them awake for days).

But fear not, I did all the thinking and testing and working, and NEWLY bug free for you:

How to automatically populate a twitter follower’s update field using a link on your blog!

All they have to do is hit the Update button!

I saw this during Moonfruit’s MacBook Pro contest, as well as someone using a bit.ly link to achieve the same effect. And I’ve been trying to recreate it ever since. It’s not hard, and I’m sure tons of people have figured it out. But when I tried to search for it, NADA.

This will come in especially handy for review/giveaway blogs, like Makes Mom Happy, The Cloth Diaper Report, and others like them (believe me, there’s TONS). Often during giveaway contests on these blogs, you can obtain entries by tweeting about the contest. Most of the time there is a pre-set message the blog owner would like you to use to advertise the contest. Now the blog owner can make a link for you and save you the trouble – if they read this post and learn how.

Review/Giveaway blog owners, here’s how you do it:

Use a link when you have a specific message you’d like tweeted, for example: “RT @halfjapanesegrl Enter a Britax Marathon CS car seat giveaway at The Cloth Diaper Report! http://bit.ly/TcYbS. Open to US and Canada!Contest is closed, by the way.

Assuming you use Twitter, click this link to see my example in action!

If you know basic HTML, like how to add a link to your blog, this will be easy peasy for you. Normally a link looks like this:

<a href=”http://www.yourlink.com”>Your Link’s Name</a>

That’s the format this Twitter tip will follow too:

<a href=”http://twitter.com/home?status=Enter the text you would like Tweeted here. The only catch is, everywhere you want to use a space, put a ‘+’ instead!” target=”_blank”>Tweet this message</a>

A couple of notes for you:

  1. DO NOT put www. in front of twitter.com or it will not work.
  2. Always put target=”_blank” in your external links. This will make your link open in a new window. Why is this important? Then YOUR site is still open in another window. Even if your visitor forgets what they were doing when they clicked on the link, eventually they will make it back to your window. This can induce more visiting on your site, and for some people this can mean more income (depending on your product or service)

Please, feel free to tweet about this blog post so other blog owners can learn how to do this too!
UPDATE: Figured it out finally, thanks to Digital Rev. Instead of spaces, use a + sign, then you won’t get any %20’s.


One comment

  1. This is very cool – and a very helpful write-up, too. I’ll have to use that for our book giveaway that will hopefully be next week. And I totally get the excitement of finally getting something to work. I was a software developer before getting better and moving on to librarianship, but I still occasionally do things for our library’s website.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: