Blog

Twitter Importer for Wordpress

February 5th, 2009 at 7:12pm | 21 Comments

In an effort to regain control of my data, I’ve written an importer for Wordpress which grabs all your tweets and inserts them into Wordpress as posts.  It allows you to choose the category and author you would like the imported posts assigned.

I ran a few Google searches about exporting all your posts from Twitter, but I only found people griping about how they could only get the first 20 posts.  By hacking the RSS feed URL, I discovered that it accepted a ‘page’ parameter, so you can actually get all your tweets from the RSS feed.  For example, to get tweets 41-60 you would just append ‘?page=3′ to your RSS feed URL: http://twitter.com/statuses/user_timeline/bradt.rss?page=3.  Of course, your profile needs to be public in order for this to work.

To install Twitter Importer into your installation of Wordpress:

  1. Download Twitter Importer
  2. Unzip it
  3. Upload twitter.php to your /wp-admin/import/ directory

Now you can use it just as any other importer.  In the admin, simply go to the ‘Tools’ > ‘Import’ and it will be in the list of importers.  Enjoy!

Jonathan E

Sounds like a great idea Brad! Maybe I’m missing something though, but I don’t see it being put to use on your site yet…

February 6th, 2009 at 6:25am

bradt

Yea, I figured I’d release it just before I launched my new homepage.

February 6th, 2009 at 10:07pm

acne

hi, im new in twitter, but i like your idea

May 7th, 2009 at 8:35pm

harknell

Hi, Just tried out your importer with WordPress 2.8.1. It only got the most recent 20 tweets. Did they close the hack you used to get this to work for all tweets?

July 15th, 2009 at 11:28pm

harknell

Follow up. It seems that depending on circumstances (unknown–possibly related to Twitter.com’s response time) You can get a variable amount of tweets imported. But redoing the import worked to get the rest. So that’s something for people to know–retry until you get them all if at first they don’t import fully.

July 16th, 2009 at 12:05am

Brad Touesnard

@harknell Thanks for letting me know. Yes, it’s fine if you just keep running the importer because it checks for duplicates before adding a tweet to Wordpress.

July 16th, 2009 at 9:32am

the radical revolution

thank you so very much for this. been looking for something like this for a while and it really is awesome. worked on the first try and all :)

~ the radical revolution } it is no measure of health to be well adjusted to a profoundly sick society ~ jiddu krishnamurti

August 12th, 2009 at 10:52pm

the radical revolution

one thing though, would be cool to turn links into links (future versions?)
~ the radical revolution

August 12th, 2009 at 10:55pm

cecil porter

awesome! thank you, this is just what I needed.

September 14th, 2009 at 10:26am

Tom

Is there a method for pulling in the tweet ID with each tweet as well? I’m not so worried about links/hashtags not working, but having that reference back to the original tweet would be great. Thanks, in any case, for an amazing utility.

October 9th, 2009 at 11:00am

Brad Touesnard

@Tom Yes, it adds the Twitter message ID as a Wordpress custom variable for every Wordpress post created.

October 9th, 2009 at 11:08am

Tom

It doesn’t seem to be doing it for me. Should I be using some specific version of WP, etc? I’m trying this with 2.8.4.

October 9th, 2009 at 11:15am

bradt

@Tom Sorry, you’re right. It doesn’t save the Twitter ID. I was thinking of the Twitter Tools plugin.

October 9th, 2009 at 11:21am

Tom

Fair enough. Do you have a plan to ever add that functionality? It seems like no Twitter import tool allows you to both grab all tweets and get their details – it’s always one or the other.

October 9th, 2009 at 11:39am

bradt

@Tom I don’t have time in the near future, but any developer could do it for you in an hour or less.

October 9th, 2009 at 12:52pm

Tom

Well, definite thanks for what you’ve done so far. It’s a great help.

October 9th, 2009 at 1:01pm

@mindez remember twitterbackup… « unlimitedinfinity

[...] @mindez remember twitterbackup? there’s a WP plugin that does that and imports! http://bradt.ca/archives/twitter-importer-for-wordpress/ [...]

February 5th, 2010 at 3:41am

Sable

I love this idea for posting tweets automatically… it would be great if there was a way to import others tweets as well…most of them are more interesting than mine:)

February 6th, 2010 at 6:47pm

vince jelenic

Thanks, a simple tool, efficient, and does exactly what it states. Kudos. Installed, tested, retested, reinstalled, ran over three twitter accounts ins — all in under 10 minutes. THIS, is how I like to see plugins work.
cheers.
Vince.

March 1st, 2010 at 10:57am

@chrismessina Tried importing … « bradt.ca

[...] Tried importing to Wordpress? http://bradt.ca/archives/twitter-importer-for-wordpress/ Never tested with your volume [...]

March 7th, 2010 at 11:31am

Pierre-Armand Lalonde

Many thanks for this great tool. Very happy to get my Twitter stream back.

March 15th, 2010 at 2:12am

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>