Posts Tagged ‘twitter’

Using Twitter Tools to integrate tweets into WordPress

August 15th, 2010 by Brian | No Comments | Filed in play

I realized the other day that I wanted blog more. At the same time I realized that I post a lot to Twitter and set out to find a way to integrate my tweets in-line with my blog posts. I also figured that as I get close to the 3200 tweet history limit it’d be nice to have some of that history in my own hands. That’s when I discovered Twitter Tools.

Twitter Tools allowed me to modify my theme in such a way that I can get my tweets either as they happen, daily or a weekly summary… pretty slick. I wanted the “as they happen” option and I wanted them to show up differently, as quick blurbs (inspired by Gina Trapani’s Smarterware.org (where I think she is using QuickPost)) right in line with my blog posts.

After some monkeying around, I learned I could switch the theme based on which tags were used in the post. So I set up Twitter Tools to use the tag “tweet”. With that in mind I used the following code in index.php:

<?php while (have_posts()) : the_post(); ?>
    <?php
        $posttags = get_the_tags();
        $tweet = false;
        if ($posttags) {
            foreach ($posttags as $tag) {
                if (‘tweets’ == $tag->name) {
                    $tweet = true;
                    break;
                }
            }
        }

        if ($tweet){
            include "post_tweet.php";
        } else {
            include "post_normal.php";
        }

    ?>
<?php endwhile; ?>

With that in place, tweets get rendered with post_tweet.php and everything else with post_normal.php. Yeah my post_tweet.php needs some love… I’m getting there….

But in the mean time – victory is mine!

Tags: , ,

Updated Twitter bots

August 10th, 2010 by Brian | No Comments | Filed in play

Finally got around to re-enabling and updating my twitter bots – including new images!

Thanks to Google’s new image search option for “labeled for reuse”

@NYBadDrivers image courtesy of Leo Reynolds (via Flickr)
@CTBadDrivers image courtesy of Daniel Case (via Wikimedia)
@NJBadDrivers image courtesy Mr. Matté (via Wikipedia)

Each account is re-enabled now, checking for any @replies to their respective account.

Tags: , ,

Launched new Twitter accounts

April 30th, 2009 by Brian | 1 Comment | Filed in play

I was inspired by this story in the Anchorage Daily News about a woman that started @AKBadDrivers “who started describing bad drivers on her personal Twitter feed from her spot in the passenger seat as she commuted in from Wasilla.” The simple brilliance of this usage of Twitter really struck me.

With tweets like

  • silver jeep, FLB 272. thanks for cutting me off not once but TWICE when you were going straight in turn only lanes prick.
  • To the girl in the Green Explorer outside Muldoon Fred Meyers this afternoon: Sorry my U-turn scared you. My bad :-(
  • white Nissan pu FEL 365 hang up ur cell phone pay attention 2 ur driving. ur lane ended & you nearly hit me merging 2 mine.

I wanted a piece of that action!

So I started @NJBadDrivers and @CTBadDrivers. Then I realized I better grab @NYBadDrivers to complete the tri-state trifecta. Imitation is the sincerest form, right ? After talking to my buddy who moved up to Alaska, he said that people really are crazy drivers up there, but come on, can they really be worse than New York, Connecticut or New Jersey drivers? (Admittedly, I’ve had licenses in all 3 states.)

I’m running with Christopher Finke‘s slick little python application called retweet on my Dreamhost account. If Chrstopher’s name sounds familiar (it should!) it’s cuz he’s the mastermind behind ScribeFire and the TwitterBar Firefox add-on. For those interested in running retweet on Dreamhost, be sure to use python2.5 as it already has the sqlite3 library configured. Once I figured that out, I cron’d it and it’s been working like a charm.

So how’s it work? All you need to do is send a message to one of the accounts via Twitter and it will get retweeted by the bot. Just say “@NJBadDrivers does anyone around here know how to function at a four way stop???” or “@NYBadDrivers srsly people, traffic circles are not that difficult”.

I wonder… is reserving Twitter names the new domain squatting? If so, would it be called twatting?

Tags: , , , ,