Archive for August 16th, 2007

How I created a TwitterGroup for Gnomedex

twitbot.gifI see Dave has posted a few ideas that he’d like to be able to do with Twitter. His ‘use case #1′ is regarding the ability to subscribe to a kind of ‘reading list’ of people at a conference. Good idea! TwitterGroups are what we need! :)

So, while I was at Gnomedex, I wanted a way to track tweets (that’s Twitter posts, for the uninitiated ;p ) from others at the conference who were also on Twitter. A show of hands from the audience showed there were a LOT of us ;) Naturally, I don’t want to have to follow every user and see everypost/tweet from them - I just want the ones relevant to the conference.

Having got the idea of how to do it in my head in the first morning session, I hacked it together quite quickly during the lunchbreak. It’s based very much like my Urban Dictionary ‘TwitterBot’ which will go and search for the (urban) meaning of a word, at the command of any follower.

So, here’s how I did it:
1. First, I set up an account, called @gnomenet

2. Then I set up a simple database table in MySql with a ’status_id’ column and a ’screen_name’ column.

3. I then invited people to ‘follow’ that account and instructed the followers to start a post with  ‘gd’ if they wanted their tweet to appear in the ‘group’ timeline - if they had something to say about the conference.

4. Then, I had a PHP script set on an automated cronjob to poll the followers.xml for the gnomenet account.  The followers.xml file always has the latest tweet from each follower, also providing the status(tweet) id and the follower’s screen name. It polled the followers.xml file once a minute, which is under Twitter’s API limit of 70 per hour.

5. When the script sees ‘gd’ at the start of a follower’s tweet, it then adds the screen_name and status_id to the database table. Then it sends that Tweet to the @gnomenet account after removing ‘gd ‘ from the start. This is easily done using Twitter’s very simple API.

6. The next time the script polls the followers.xml file, if it sees the same user posting the same thing (it compares each status_id with existing records in the database) it says to itself “this user already said that!” and ignores it.

7. If the follower does not have gd at the start of the Tweet, then the script goes and deletes from the database table any post from that user/screen_name  - ie: mostly, there is nothing to delete, as people don’t post to it all the time.

Doing this keeps the database table clean and compact. It worked pretty well for 52 followers! I wonder how many them were not even there at the conference! :)

This has a load of potential uses for TwitterBot automation and TwitterGroup creation, though I’m sure there might be a more graceful way of doing this. Happy to hear more ideas

Gnomedex was GREAT fun again - this was my third. But I have to say, I’m looking forward to the possibility of ‘GnomeStock‘ ;p

Dinner at the cabin bar


As my seat was in the ’snooze zone’ i had dinner at the bar before folding down my bed and sleeping all the way. Nice one Branson! :)
posted by kosso using mobods : [permalink]


 

August 2007
M T W T F S S
« Jul   Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Who is this 'kosso' anyway?

I am a 'Createc'. A creative technologist, entrepreneur/ hacker/ geek. Worked on building things on the web for over 12 years.

I'm engaged to the beautiful Efisia Fele :)

Used to work at BBC News interactive and created the publishing and delivery systems for video news to get distributed on huge screens in major railway stations around the country.

I left the BBC to become CTO / sole-lead architect/developer at podcast.com for three years.

I have now left them to build a start up a new system called 'Phreadz', which is a 'Social Multimedia Conversation Network', integrating everything that is 'V.I.T.A.L' to us on the web. Video, Images, Text, Audio and Links.

I built the whole thing my myself and will soon be looking for funds to expand the team and system to make it available to launch.

There are currently happy and helpful 500 (closed) beta testers on the system so far and one client of a white-labelled solution.

Phreadz has a business model, which is already working.

kosso's flickr stream

queue up behind the winner

Re: mike butcher - bus conductor :)

Re: mike butcher - bus conductor :)

mike butcher - bus conductor :)

skimbit in the area

in the party @Fox

Free Beer! :)

bbc ian.

Re: Tony Fish : AMFVnetures talks about Mobile

Ben gets back to basics

More Photos

RSS me and my twitters

  • An error has occurred; the feed is probably down. Try again later.

About kosso

I'm currently the CTO at podcast.com - ex-BBC News interactive. Love gadgets. Loves to makes tools for gadgets. In love with building on the web for over a decade.

stats

  • 109,570