[Note: I've posted a Twitterstars update]
Finding and connecting with local social media 'superstars' can be a valuable short-cut for anyone trying to ramp up quickly in online social environments. These enthusiasts are knowledgeable about social media tools, are highly-connected, and understand well how to succeed in the online social environment.
But how do you find the local social media superstars? Today, many of these individuals use Twitter. The "Local Twitterstars" mini-application below takes any
US geographic search area that you provide and returns a feed of the top five most followed individuals on Twitter who have been recently active in the region. Below is a more detailed explanation of how I built this mini-application. I also posted an update here.
This mini-application uses the Twitter Search API, the Twitter REST API, Yahoo! Pipes, and some simple HTML.
- The simple HTML form above constructs a server GET request through both hidden and user-populated form fields.
- This constructed URL queries a custom-built Yahoo! Pipe that takes the location from the URL and converts it to LAT-LONG coordinates.
- A Twitter search API query is then constructed by the Pipe using the LAT-LONG and radius data, returning the 100 most recent tweets in this region. Depending on your search area, this could include only very recent tweets or could span a much longer time period. Twitter has some internal smarts around matching the coordinates to include a variety of data that users put into the location field of their profile, including towns, zip codes, iPhone GPS coordinates, etc.
- The Pipe then takes all the tweets and constructs a series of queries to the Twitter REST API, pulling back user profile data from each user behind the tweets.
- After removing duplicates, the Pipe selects the top five most followed users in the list and builds an RSS feed presenting the username, a link to their twitter account, and the current number of followers they have.
NOTE: If the feed request is empty, try changing your search criteria. It's also quite possible that Twitter is struggling to handle load and won't fulfill the API requests.
If you find this mini-application useful, please let me know. Suggestions for modifications and improvements are always welcome.