Image 01 Image 02

Twitter bot for yahoo

Posted on 30th January 2008 by Taggy
15

 

 

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 .

But thanks to Philip 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 twitterNow 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 worksSending 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/twitterAnd 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



15
Responses to.. Twitter bot for yahoo

Kalyan posted on February 1st 2008

this is nice, thanks for bringing it on !

Kalyan



[...] our bot for twitter got listed :) on twitter help page ! but infortunately we are unable to run the bot ! any one ready to accomodate us ? or can help me get along with mediatemple servers ? [...]



Philip Tellis posted on February 16th 2008

Hey, this is cool. Just one correction though. My name is Philip, not Philips.



Philip Tellis posted on February 16th 2008

I’m just not comfortable giving out my password to anyone else.



Philip Tellis posted on February 16th 2008

btw, did you write python bindings for libyahoo2? would you like to push your code as part of the libyahoo2 svn tree?



[...] our bot for twitter got listed on twitter help page ! but infortunately we are unable to run the bot ! any one ready to accomodate us ? or can help me get along with mediatemple servers ?http://help.twitter.com/index.php?pg=kb.page&id=112 [...]



Taggy posted on February 16th 2008

@philip name is now corrected .We did make some python code to work seamlessly with the C library ! but its really too early to release it . Lot of dirty code. We are now cleaning up a lot of stuff for a version 2 and we will be happy to upload the code .

and about the password ,i know its bad ! even we hate it but we could not find a way out ! iam thinking of using curl to have http sessions or i will have to wait until twitter implements OAuth ( havent used it ) but they tell me thats answer to these passwd issues !
U have any ideas how we could possible maintain sessions ?



Philip Tellis posted on February 16th 2008

its really too early to release it

That’s completely against the spirit of FOSS - release early and release often.

Releasing dirty code is good because you get a lot of people to review it and tell you how to fix it, and your feelings won’t get hurt. Releasing code that you think is good, but that others think isn’t could hurt your feelings :)

BTW, why is it that when I press Tab in this text box the focus goes to your logo and not to the Post button below it? Isn’t the site keyboard accessible?



Taggy posted on February 16th 2008

@philip ,as you say :) give us time till wednesday when we wind up our exams and we should be getting the code out .
TAB from my browser does go to the post button .iam safari SVN build though ! will try from firefox and tell ya



KaiToU posted on April 25th 2008

I want to try this bot, but it’s offline :-??
BTW, when I register on http://theyagar.com/twitter/ it gave me ’secret’ and i don’t know what is it for :-??

thanx in advance



Taggy posted on April 25th 2008

@KaiTou the yahoo bot won’t work since yahoo changed the way it works and my bot doesnt login to yahoo anymore ! the service is out as of now !



Philip Tellis posted on April 26th 2008

Taggy, what are you talking about? libyahoo2 works fine for me and everyone else using it. Perhaps you should stay up to date with the libyahoo2-cvs mailing list.



How Twitter Bot Works? « TECH IDEA posted on June 25th 2008

[...] Bot Works? Question: How Twitter Bot Works? Answer: Taggy casted a posts about it. “How Twitter Bot Interact With You“. Thanks to [...]



[...] our bot for twitter got listed :) on twitter help page ! but infortunately we are unable to run the bot ! any one ready to accomodate us ? or can help me get along with mediatemple servers ? [...]



[...] Instant Messaging, whereas Twitter still seems to have a need for third party services, add-ins and other tools to get the job done if the service used is something other than Google Talk, Livejournal Chat or [...]



Leave a reply...