Create a simple Twitter IM bot
->
Some time back I worte a post about a Twitter Google bot in www.crankup.net. As promised, here is how you can develop your own google talk bot which can post your messages to Twitter.
First, You need an imified account for your bot to work properly. Get one here. Once the account is created, login to your account and give your new bot a name. I call it Post2Twitter.
Now its time to develop the bot. I have used PHP to post message from the chat window to twitter.Below is the code.
<?php error_reporting(0); require('twitterAPI.php'); $message = $_REQUEST['msg']; if(isset($message)) { $extracted = explode("$",$message); $twitter_username = $extracted[0]; $twitter_psw = $extracted[1]; $twitter_message = $extracted[2]; if(strlen($twitter_message)<1){ echo "Sorry! Please enter a message to post!"; exit(0); } else { $twitter_status=postToTwitter($twitter_username, $twitter_psw, $twitter_message); } } ?>
Looks simple? Infact it is not. I have used anoter file which will post the message to twitter. Get the include file here.
Now upload both the files to a webserver and provide the url in your bot setting page (imified.com).Once this is done you can invite your bot to your google talk and start having fun. The above code is self explanatory if you have any queries please post it as a comment.
Hello there! If you're new here, you may want to subscribe to my RSS feeds . which is, of course, FREE :). You can also Subscribe via Email. Are you a Twitter user? then you can also follow me on Twitter. Thank you you for reading!


a good example to learn, but not a good application….you could have manage states. Thanx for sharing
Yes Vaibhav .. You are right its good for learning only
No security as pwd are clear text. Thanks for your comment.