Yahoo Launches SQL Interface to Twitter - Stay N Alive

Yahoo Launches SQL Interface to Twitter

yql128-6333387Every time I switch to jQuery, Yahoo’s YUI libraries seem to keep luring me back.  Just yesterday, Yahoo added one more tool to its arsenal of YQL libraries that actually makes the Twitter API intuitive, giving me another reason yet to switch back to yui, or at least consider using Yahoo a little more as I develop tools for the Social Web.  The new YQL set of tables for Twitter enables any developer to use simple SQL-like queries to retrieve and post Twitter data.

For simple user queries, getting a user’s twitter profile data is as simple as something like “SELECT * FROM twitter.status WHERE id=’8036408424′;“.  To insert data, you simply need to provide the oauth consumer key and secret, along with the user’s oauth tokens and you can do things like post new status updates for the user, all in Javascript!  A subsequent call to post a user’s status would look like:

INSERT INTO twitter.status (status, oauth_consumer_key, oauth_consumer_secret, oauth_token, oauth_token_secret)
VALUES (‘tweeting from yql!’, ‘@your_consumer_key’, ‘@your_consumer_secret’, ‘@your_access_token’, ‘@your_access_secret’);

The cool thing about Yahoo’s YQL Twitter interface is I can also choose to only pull specific information out for the user.  I’m not quite sure the benefit this gives you considering Yahoo is probably still retrieving the entire subset of data from Twitter (you can’t pull specific pieces of data out of specific objects in the Twitter API), but at least it’s possible, something I’ve been craving from the Twitter API for quite awhile.  It is unclear if Yahoo is caching this data, and if so, it could provide some significant performance benefits, with Yahoo doing most of the work on their own backend.

Yahoo’s YQL puts them one level above Facebook’s own FQL query language for accessing Facebook data by enabling developers to not only access data like this for Twitter, but also other environments like Facebook as well.  Yahoo has an entire database of “community tables”, where, if specific APIs aren’t provided, the community can create their own tables to that interface and give developers immediate access to those APIs via a simple, standardized SQL interface to those platforms.

This type of API is exactly what I was looking for from the likes of Google’s Friend Connect APIs (and Google has still failed to provide) – a standardized platform where one single API gives me access to all the different APIs out there.  Now with standardized SQL I can access almost any API, and if that API doesn’t exist yet I can create my own interfaces into each API that, once created will also have access via that SQL interface.

Yahoo now has my attention with this launch.  The API has a web interface, where a call as simple HTTP GET to http://query.yahooapis.com/v1/public/yql?[query_params] returns an entire structure of XML data my application can access.  They provide a YUI Javascript interface into the table structure so you don’t need a backend if you don’t want one, and I get all this for all the APIs I interface with.

I will now be looking into the Yahoo APIs as I look to interface the limitless APIs available out there thanks to Yahoo’s focus on cross-platform integration of their YQL interface.  I like that Yahoo isn’t being selfish with this.  With YQL, Yahoo has finally created a glue that lets me access all the APIs I need to access as a Building Block Web brick builder.


Discover more from Stay N Alive

Subscribe to get the latest posts sent to your email.

12 thoughts on “Yahoo Launches SQL Interface to Twitter

  1. As I mentioned, the advantage here is if you want to develop for multiple
    platforms, you can use one standard to interface with all the platforms. At
    the same time, I believe Yahoo is caching some of it on their end, so your
    queries should be much less bandwidth intensive since you can specify
    specific elements to retrieve in your SELECT statement.

  2. YQL doesn't provide the actual OAuth process so you'll need to implement
    that yourself, but once the user is logged in and you have an auth token and
    secret for them you can use those very easily in your YQL queries to get and
    post data to Twitter.

  3. One advantage of using YQL for filtering further before returning the data to the client is mobile. If you only need a subset of the data and you've got a slow connection like AT&T 3G :), you might want to reduce the payload as much as you can before sending it over that pipe.

  4. spullara, I agree completely – this makes mobile much easier because Yahoo
    is doing the bulk of the transaction on their servers before passing onto
    you.

  5. […] happy to oblige.Help us help Yahoo.Thanks.Related BlogsRelated Blogs on googleRelated Blogs on yahooYahoo Launches SQL Interface to Twitter | Stay N' AliveDissecting Yahoo's Network Distribution Settings | The Adventures … Tweet This […]

  6. […] happy to oblige.Help us help Yahoo.Thanks.Related BlogsRelated Blogs on googleRelated Blogs on yahooYahoo Launches SQL Interface to Twitter | Stay N’ AliveDissecting Yahoo’s Network Distribution Settings | The Adventures … Tweet This […]

  7. […] happy to oblige.Help us help Yahoo.Thanks.Related BlogsRelated Blogs on googleRelated Blogs on yahooYahoo Launches SQL Interface to Twitter | Stay N’ AliveDissecting Yahoo’s Network Distribution Settings | The Adventures … Tweet This […]

Leave a Reply

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

Discover more from Stay N Alive

Subscribe now to keep reading and get access to the full archive.

Continue reading