Twitter Search with Flex Builder

07 December 2009

If you are building a flex Twitter app there are some things you just cannot create this app without.

Especially this function. It’s a twitter search function build with Flex Builder.

Let’s say you want to let your application users search for twitter friends. Well with this function that is possible.

The code for this is actually not big and generated with the connection wizard adobe provides within the Flex Builder.

I did no username and password handling within this small app, so you will get a Twitter / Browser popup to put in your own login information. We do not save or use this login information as this popup come directly from twitter itself.

twit_search_1 twit_search_2 twit_search_3

 

You can easily connect to the search api by using the HTTP Service Wizard inside the Flex Builder.

You will have to use this URL to connect:

http://api.twitter.com/1/users/search.xml

And then use the q variable which stands for the search string.

When using the wizard your config should look something like this

twit_search_4

When configurating the return type you should select the USER as root.

twit_search_5

For more information about the Twitter Search API :

http://snurl.eu/twitapi

Download the Air Application here  (install, rightclick application to get all the source code)

Don’t have the AIR runtime yet? Download it here

Related posts:

  1. Connect to Twitter from AIR example
  2. Connect to Google Analytics from Flash Builder
  3. Using States in Flash Builder
  4. TinyURL usage with Flash Builder

Comments

Got something to say?