As the community of twittering people grows really fast, the Twitter Search API is becoming increasingly fascinating. After the Pirate Bay trial you could for example follow the twitterstorm from hour to hour when using the API.

Today I have been trying out the API with a very simple Flex application. It was amazingly easy to set up. By the use of HTPPService I call a couple of JSON formatted services for retrieving popular topics. I used the JSON decoder in the as3corelib. But the decoded object needed some parsing before beeing useful as a dataprovider for my Repeater:

private function parseJSONResult(jsonResult:Object):Array
{
	for (var p1:String in jsonResult)
	{
		for( var p2:String in jsonResult[p1])
		{
			if (jsonResult[p1][p2] is Array)
			{
				return jsonResult[p1][p2] as Array;
			}
		}
	}
	return null;
}

When selecting a topic I also used the HTTPService. In order to resolve the Atom feed I used the resultFormat “e4x” and then declared the namespace:

private namespace atom = "http://www.w3.org/2005/Atom";
use namespace atom;

And this is how the app looks like. Right-click on the app and select “view source” if you are interested in the details.

And, by the way, you can always follow my own twitterings on @fsandx.

 

2 Responses to Fascinating Twitter Searches

  1. Lea says:

    Thanks for writing this.

  2. You should join in a contest personally of the best personal blogs on the web. I will recommend it site!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">