Okay, so it looks like I’ve gotten the Twitter-to-MT thing working. Yay! Easy (if short) blogging from the road, by just sending an SMS message to Twitter from my mobile.
No, I will not be now flooding the blog with descriptions of where I am, what I’m doing, what I’m eating, or what bodily functions I may be engaging in. I see it as a means to more easily blogging.
I made use of the MT-Twitter plugin to Movable Type. That’s what Doyce is using, and I let him do all the debugging and figuring out what to tweak. For those similarly inclined. The items he pointed out to change in the plugin file:
1. At line 204, the line
$entry->title( $twitter_title . '(#' $tweet->{id} . ')' );defines how the title line of the post will look. Twitter entries (“tweets,” sigh) don’t actually have titles, so the value is fixed — the default is a text you set in the MT-Twitter control panel in MT, plus in parens the ID of the tweet.
Well, I don’t care about the tweet ID. Doyce is currently putting “(via Twitter)” in there, but I wanted something unique but useful, so that when looking at comments I can have some clue what it’s about. Ideally I’d have an N-word excerpt from the tweet, but there’s no obvious way to do that.
Instead, I’m using the date strong used to set the date on the post. This is a bit ugly, but both readable (“Ah, someone’s commenting on my Twitter post from last June”) and unique.
$entry->title( $twitter_title . ' (at ' . jsondate2ts( $blog->id, $tweet->{created_at} ) . ')' );2. A few lines down, there’s a line that begins …
$entry->text_more( 'http://twitter.com/' ...
This line creates an extended post field with the URL for the entry on Twitter — which I don’t care about. So I commented it out.
3. Way down at the bottom, there’s an if-block:
if ( $level == MT::Log::DEBUG() && $loglevel == 0 )
With “{ return; }” lines below it. Comment that whole block out. It was causing an error, and it’s only used in debug mode.
(Note — credit for digging all the above up goes to Doyce, not me.)
So, will all of this make it easier for me to actually blog, such that (more importantly) I blog more (albeit in short entries)?
We’ll see. But it’s good to know that I can, if I want to.
Oh, and …
“I’m sitting at the table, drinking a soda, and I’m going to bed now.”