Fascinating Twitter Searches
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.
About this entry
You’re currently reading “Fascinating Twitter Searches,” an entry on Subotnik Blog
- Published:
- 18.04.09 / 7pm
- Category:
- public API´s


1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]