Hacking (Fixing) WP Twitter-Tools

I’m writing this post in hopes that someone else who has this problem uses their Google-fu to find this solution. And so I don’t forget what I did.

I’ve had problems with Twitter-Tools for WordPress successfully pulling in tweets, but then failing to post them as blog posts. That’s why I moved from MT to WP in the first place, to ensure that my tweets were archived with my other blog posts after my favorite MT-Twitter plugin went belly-up. So, when Twitter-Tools goes wonky for whatever reason, I’m on it.

This time around, I saw that about three tweets (all I’d tweeted in a given day) were missing from my blog. I checked the Tweets menu in WordPress — and there they were.

(Yes, I know I need to upgrade WordPress. I’ll get on that.)

So, they were pulled in, but never posted, which meant they were in the MySQL database tables somewhere. I just needed to make posts out of them somehow (and preferably not by copy-and-paste from Twitter, which I have done before out of desperation).

Time to log into cPanel and check the WordPress tables via phpMyAdmin.

I’ve messed around enough under the hood to know that the table that holds the content of my blog posts is named wp_posts. I opened that table and clicked the post_date column header to sort.

(If I’d known I would actually fix it by doing this, I might have taken screenshots of the database while it was still missing rows. As it is, the screenshots are really just intended to show exactly where I was and what I was doing there.)

I scanned through and found the text of the missing tweets. Upon comparing the missing tweets to the posted tweets, I discovered which fields to modify when duplicating these records in the database to add the archived tweets to my blog posts.

Post_author was different, but since I’m the only author on my blog, it didn’t seem that important. Post_title would need changed to append my standard “Twitter Update:” to the beginning of the tweet text. Post_name is the slug, so that definitely needed changed from a number to the text title of each tweet, with dashes for spaces. Guid seemed to need a “-post” appended to the existing twitter-[giant_number_here] ID. Finally, post_type needed to be changed from “aktt_tweet” to “post”.

I clicked “copy” in the UI for each tweet I needed to post, and phpMyAdmin kindly created the SQL for me to insert a new row with the same field values as the existing row. I made the changes I needed, hit GO, and poof! A new tweet on my blog… that wasn’t associated with a category. Yeah, there’s a separate table for that.

No worries. One little tweak in the WordPress admin screens. If I’d missed more than three tweets, that could be annoying, but I could have bulk edited them if necessary.

All fixed! My rogue tweets are now posted to my blog, and all is right with the world. As long as Twitter-Tools has actually pulled the tweets into the database, and it’s just a glitch in posting them as blog entries, this should act as a proper band-aid.

Leave a Reply

Your email address will not be published. Required fields are marked *