Current version : 2.0 – compatible with Twitter's OAuth API
If you want to browse your own tweet history, Twitter sucks. If you have published more than 3200 tweets, Twitter lost the older ones. If you want to search a particular tweet about that awesome link you shared, you're toast. You can use #hashtags in your tweets but they won't be of any use to help you organize them. Oh, and those horrible t.co links.
On the other hand, WordPress does all this fine, so I made a plugin to archive all your tweets in WordPress, easily search them, and everything you wish Twitter would do.
My tweet archive: Ozh' Tweets (notice the cool stats in the sidebar)
Extract and upload to your blog, preserving directory structure.
- Install a fresh new empty blog (a subdirectory of your current blog will be fine, or a tweet.domain.com subdomain, it doesn't matter)
- Install, activate the plugin, follow configuration instructions.
Features, Plugin Configuration
You'll need to create a Twitter application to obtain the consumer and secret keys. That'll be the hardest part.
Q: The [whatever] does not work!
Q: But [Other guy's plugin] does the same and more!
A: Exactly. "And more". I didn't need this.
Q: How are tweets imported?
A: As regular posts, with a few post custom fields (containing tweet source, "in reply to" data, etc). Hashtags can be converted as post tags if you wish (you'll want to do this), t.co links can be expanded to their original URLs, and some proper markup will be applied (see below, developer info)
Q: I tried to import all my tweets for the first time but the page died with an error / timeout / alien abduction !!1
A: Just hit F5 to reload the page. There will be no duplicates.
Q: I have more than 3200 tweets. How do I import & archive the old ones?
A: You can't. Or you write a custom importer using my plugin functions as a start, download your entire archive from your Twitter profile, and do something with that.
Q: What theme did you use for your Tweet archive?
A: A modified version of Stopdesign's to use some features of my plugin. It's available in this SVN repository (probably don't expect any update) or as this zip file: ozh-tweet-archive-theme. No support or anything on this, this is for example only.
Q: Can you add this or that feature?
A: This plugin was made to fit my needs. But hey, who knows, maybe I'll feel the need for your idea? Head to the Github repository and file a pull request.
Q: That one tweet got weirdly formatted/truncated when imported!
A: There's an "Edit post" link somewhere. That's the beauty of WordPress when compared to Twitter.
Q: Something doesn't work
A: Create a file named debug.log in this plugin's directory. This will activate the debug mode and a lot of things will be logged in that file. See if that helps.
Theme developer stuff
Each tweet will be added some markup and classes, depending on your settings (if you want to link to @mentions, link to #hashtags as tags, etc…) to allow fine styling.
When linked to Twitter profiles:
- <span class="username username_linked">@<a href="https://twitter.com/ozh" title="Ozh Richard">ozh</a></span>
- <span title="@ozh" class="username username_unlinked">@ozh</span>
You can elect to link hashtags to Twitter (as Twitter does), as local WordPress tags (much cooler), or to not link them. In each case, the markup for #bleh will be:
When linked to Twitter:
- <span class="hashtag hashtag_twitter">#<a href="https://twitter.com/search?q=#bleh">bleh</a></span>
When locally linked to WordPress tags:
- <span class="hashtag hashtag_local">#<a href="http://yoursite.com/tag/bleh">bleh</a>
- <span class="hashtag hashtag_no">#bleh</span>
Links can be "un-t.co'd" (expanded)
- <a href="http://example.com" title="http://example.com" class="link link_untco">example.com</a>
Or kept as original t.co links:
- <a href="http://t.co/L4m3l1nk" class="link link_tco">http://t.co/L4m3l1nk</a>
If you enable embedding images from pic.twitter.com, you'll get the following:
- <span class="embed_image embed_image_yes"><a href="[image link]"><img src="[image src]" /></a></span>
Want to share or tweet this page? Please use this short URL: http://ozh.in/tq