Twitter bot for yahoo

January 31st, 2008 by taggy
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.5 out of 5)
Loading ... Loading ...


Global

After my previous attempt at making a twitter bot resulted with a decent liking from people ,i thought i would hack up another one .

Some of my friends are addicted to yahoo and they r on it most of the days so why not a bot to help you twitter from yahoo messenger ?

However there were some fundamental problems,one of them was to maintain sessions . There was virtually no way i could keep a user logged in without having to store his/her password which i absolutely hated ! and asking on the twitter mailing lists only told me that i would have to wait until twitter adopts OAuth .

But still myself and Doniv ,making a yahoo bot for twitter was worth a try for two reasons .

  • We <3 twitter
  • Making a bot for yahoo was going to be a little more challenging than making ajabber bot since yahoo messenger protocol was not open like the jabber .

But thanks to Philips Tellis and his Libyahoo2 ,life was going to be much easier .

And we started with it . First we setup a page tocheck for user credentials and update his yahooid in to out database.We only store their twitter and yahoo username .

Then set about writing the bot in C/Python .

Here is how its going to be started ,its not the bot you want to use everyday because it does have a few flaws but if you are out without Gmail then you could as well use it .

After registering with the website here http://theyagar.com/twitter ,add twitterme as your friend at yahoo.

Now the most important part ,the tweet sending part .As i mentioned earlier ,we could virtually find no way of having users logging in without raw text passwords and so this ugly looking way (honestly) .

twitter_username twitter_password twiter_message is the format .for eg,

myusername mypassword hey test message to twitter

Now what happens next is it goes in to our DB and tries to match your followers with registered users and if it does then the yahooid is sent a tweet .

So while you can always send a tweet from out client ,you can recieve it only if your friends send it from yahoo bot too .

Twitter i dont think has any hook to be notified when there is a tweet although we could poll but all that for later .

This works from Gaim/Pidgin ,Meebo and Yahoo messenger Windows .Iam not sure about the other clients since all these client send out html messages and parsing out them was a headache .

Let me show you some screenshots of how this works

Sending the message from Pidgin

pidgin.jpg

A follower recieving his friends tweet on his yahoo account :)

yahoo.jpg

I will put the code up for download ,i understand if some people have problems in giving out the passwords as plain text in the IM window but we couldnt find a way out . If you know a better way to do it then please leave back a comment or mail from the contact form i would love to hear back from you .

Again as it started this bot was made purely for learning and for the fun of it .You can use it trusting us .

I will put up the source code in sometime after cleaning up the mess . Or if you dont mind having a code that can be a little difficult to understand then mail me and i would send it to you .

So please go ahead ,use out bot and tell us why it sucks :P .

http://theyagar.com/twitter

And yes the bot is now running from a adhoc server and it wont run on the mediatemple servers :( gives me a error . Is anyone willing to host our bot ? it certainly doesnt require root( I run it completely on a non root) .We would love to have it hosted in a place it can run freely .

It requires gcc and python 2.4 installed anyone willing ?

or any ideas/sugegstion/improvements ? please feel free to comment

Lesson i learnt : Necessity is the mother of all inventions :)

Posted in Technology |

One Response

  1. Archana Says:

    Taggy,

    we can host your bot !

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.