September 7, 2010
Twitter OAuth PHP library

Twitter API shut down Basic Auth on August 31. I was a big fan of the Arc90 Twitter library, but its no longer usable because of the shutdown. Even before the shutdown, I’d been using Abraham’s twitterOAuth for Twitter Signin integration with my websites. Its a nice library that hides the OAuth security aspects from developers. But after having used Arc90 library in all my projects, migrating the code to another library was costly and time consuming.

So, I merged both the libraries. I enabled OAuth in Arc90 library by making some internal calls to twitterOAuth library. This way, I could continue using Arc90 library in my projects just by porting the new library and adding few lines of code to pass access tokens to the library object.

I’ve published the library in GitHub at http://github.com/yemkay/arc90-twitteroauth, which is also my first Open Source contribution. 

Here is a code snippet that retrieves Twitter home timeline using the new library:

<?php

require_once("lib/Arc90/Service/Twitter.php");
$twitter = new Arc90_Service_Twitter();
//Pass consumer key, secret of Oauth app and user's access token, secret
$twitter->useOAuth('OAUTH_CONSUMER_KEY', 'OAUTH_CONSUMER_SECRET', 'USER_TOKEN', 'USER_SECRET');
//Get tweets from user's timeline
$response = $this->twitter->getFriendsTimeline('json', array('count' => 200, 'page' => $page));
echo ('HTTP code: '.$response->getHttpCode());

if (!$response->isError())
{
	$messages = $response->getJsonData();
	echo 'Found '.count($messages).' new tweets';	
	/* GO AHEAD AND PROCESS TWEETS */
}
else
{
	echo 'Error description: '.$response->getData();
}


?>

11:23pm  |   URL: http://tmblr.co/ZkjYJy10VU_F
(View comments
Filed under: Projects 
July 6, 2010
Associated Parsers: FootTweet and Twitter Streaming API

My post on AP blog about how we used Streaming API for gathering Twitter posts to FootTweet

FootTweet is a virtual FootBall game played on the platform of Twitter. We use the powerful Twitter Streaming API to get the tweets to FootTweet in a few seconds after they were posted to Twitter.

When you have number of keywords to track and you want the information in real time,…

July 3, 2010
Associated Parsers: Foottweet !

Our first launch from Associated Parsers. Go check out!!!

Introducing FootTweet, a very advanced web app that displays and categorizes tweets according to their content !

We’ve decided to show our technology applied to the World Cup, ‘cause there’s about 3 billion ppl watching, and we thought some of them could be tweeting as well ;)

Twitter.com…

3:22pm  |   URL: http://tmblr.co/ZkjYJyq8S0x
(View comments  
Filed under: Projects Twitter 
April 18, 2009
CricTwits



Check out my biggest launch till date: CricTwits - an aggregator of Twitter conversations revolving around Cricket matches. This project was inspired from Title Tweets, a similar initiative for a basketball tournament in USA.

It took 2 weeks to build this website after getting an inspiration from Title Tweets. CricTwits collects twitter posts containing references to cricket matches, team names, player names. The match page shows tweets favoring the two teams and also allows you to post to your twitter timeline from within the Website. There is also a live scoreboard on the match page. So, you have one reason less to leave the website.

I timed the launch to coincide with IPL. CricTwits is a great platform for IPL fans to stay close to thier favorite club. Go Tweet!!

CricTwits

Liked posts on Tumblr: More liked posts »