Blog

Twitter Importer for WordPress

Update: I’ve updated this importer to be a WordPress 3.0 plugin. Download it at
http://wordpress.org/extend/plugins/twitter-importer/
Thanks to Stephanie for helping out.

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!

  • http://www.reinspire.net 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…

  • http://bradt.ca/ bradt

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

  • http://cureacnescar.info acne

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

  • http://www.onezumi.com 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?

  • http://www.onezumi.com 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.

  • http://bradt.ca/ 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.

  • http://theradicalrevolution.info 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

  • http://theradicalrevolution.info the radical revolution

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

  • cecil porter

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

  • 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.

  • http://bradt.ca/ Brad Touesnard

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

  • 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.

  • http://bradt.ca/ bradt

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

  • 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.

  • http://bradt.ca/ bradt

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

  • Tom

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

  • Pingback: @mindez remember twitterbackup… « unlimitedinfinity

  • http://newmoonie.com 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:)

  • http://greenspotantiques.com/wp 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.

  • Pingback: @chrismessina Tried importing … « bradt.ca

  • http://www.palalonde.com/ Pierre-Armand Lalonde

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

  • Pingback: WBJB.org Blogs Developer » Importing Content

  • Pingback: ??? ??????? ????????? ??????????? ?????????? Twitter ? ???????????? ?????? ?? ?????? | Lifehacker.ru

  • Pingback: ??? ??????? ????????? ??????????? ?????????? Twitter ? ???????????? ?????? ?? ?????? | ??? ? ????????

  • http://sillybean.net Stephanie Leary

    Brad, thanks for writing this! I’ve updated it for 3.0. Can I send you a copy?

  • Pingback: Twitter Archive, WordPress Importer | sillybean.net

  • http://jonathanstephens.us Jonathan Stephens

    I’m trying to create an RSS archive of a search term/hashtag. Your plug-in is exactly what I had in mind to accomplish it. Any way to configure the importer to only import a certain RSS feed without attaching it to specific account?

  • http://bradt.ca/ bradt

    @Jonathan Just use the RSS Importer: http://wordpress.org/extend/plugins/rss-importer/

  • Pingback: Twitter Importer für WordPress

  • Pingback: K A R A K A F A » http://bradt.ca/archives/twitt…

  • http://mr-mushroom.com mushroom

    Is there a simple way to schedule this import in CRON?

  • http://bradt.ca/ Brad

    @mushroom This plugin is only meant to import all your existing tweets. You may want to check out Twitter Tools for ongoing importing of your tweets.

  • Pingback: Source and Code » Blog Archive » Importing other blog content to WordPress

  • Pingback: Use WordPress to Create a Searchable Archive of Your Tweets

  • http://austinpassy.com The Frosty

    Hey, great plugin! Wondering if there is a way to pull in more content from the feed like the , and others like it into corresponding custom fields?

    Any idea?

  • http://www.3till7.net/ Sarah

    Hm, in WordPress 3.0.1, there doesn’t appear to be an import directory under wp-admin. Any idea what I should do?

  • http://www.3till7.net/ Sarah

    Interesting, I just made wp-admin/import and put your Twitter importer there. It then shows up on the Import page in my Dashboard, but when I click it, I just get the Import list again with this error: “ERROR: The twitter importer is invalid or is not installed.”

  • http://bradt.ca/ Brad

    @Sarah Please use the plugin version at http://wordpress.org/extend/plugins/twitter-importer/

  • Pingback: Autoblogging: Wie geht das? (HowTo) Teil 1

  • http://www.hkpowerstudio.wordpress.com Heather

    in the process of building my website and I added this plug in but it’s not showing up. it was activated, any hints? (its not on the blog that I posted here but on another, private site). email me if you need to have a look.

  • Steve Mrante

    I tried Twitter Importer without luck. My WordPress is 3.0.4, default theme, no other plugins, very minimal blog in general. My twitter timeline is less than 1000 tweets and two years old.
    Twitter Importer 2010-06-30 did nothing.

  • http://easykick.de Fußball

    Have the same problem like Steve. I work with 3.0 and it does not pull any twitter posts.

    Any updates on this?

  • Pingback: Twitter Importer Review Review by Best Plugins for Wordpress

  • Chris

    I’ve just tried this plugin with WordPress 3.1 and I get the message “ERROR: The twitter importer is invalid or is not installed.” There is only one ‘Twitter’ entry in the list of importers in Tools / Import

  • Chris

    I’ve just seen that this plugin is only compatible up to v3.0.5, so I guess that’s why it doesn’t work, I’m using v0.1 from here: http://wordpress.org/extend/plugins/twitter-importer/

  • Imp

    May I ask if this has been abandoned? As of the latest version of wp, 3.2.1, tweets are no longer pulled to my blog. :-(

  • http://bradt.ca/ Brad

    Comments have been closed. Please use the WordPress.org forum: http://wordpress.org/tags/twitter-importer