Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

YQL Sample, keys, and misc.

So the kitchen sink has a great example of using yql, but when I use the same code in my application (slightly modified to work properly with a sible tab) it provides a error with NSDomain…

Simply put, I cannot find any good documentation on using yql with Titanium, nor any examples that show where to enter in the keys that Yahoo provides. I cannot even find this in the kitchen sink example.

Does anyone has sample code illustrating a standalone yql app (not flickr related) that works in 1.0.0???

— asked March 18th 2010 by Conrad Fuhrman
  • documentation
  • domain
  • error
  • yahoo
  • yql

2 Answers

  • Hi Conrad, here is a very simple sample code using YQL to get some data from Yahoo! Meme:

    // Including OAuth Secrets And set the OAuth Params
    var consumerKey = '######YOUR CONSUMER KEY COMES HERE ##########';
    var sharedSecret = '####### YOUR SHARED SECRET COMES HERE #########';
    Titanium.Yahoo.yql('SELECT * from meme.info WHERE name="acarlos1000"',function(e)
            Ti.API.info("Starting loop with YQL Query");
            Ti.API.debug('Found YQL results data? ' + e.success);
            if (e.message)
                Ti.API.error('Error Message: ' + e.message);
            meme = e.data.meme;
            memeName = meme.name;
            memeUrl = meme.url;
            guid = meme.guid;
            memeTitle = meme.title;
            memeNumFollowers = meme.followers;
            memeAvatarUrl = meme.avatar_url;
            memeDescription = meme.description;
            //Debug Info with data coming from YQL query
            Titanium.API.info('Data from query on meme.info table');
            Titanium.API.debug('Meme Description: ' + memeDescription);
            Titanium.API.debug('Meme Title: ' + memeTitle);
            Titanium.API.debug('Meme Avatar URL: ' + memeAvatarUrl);
            Titanium.API.error("Error = " + E);
    — answered March 19th 2010 by Antonio Silveira
    • I'm trying to use this with the fantasy sports api, but it gives me the following error:
      Authentication Error. The table fantasysports.players requires a higher security level than is provided, you provided ANY but at least USER is expected.

      Any ideas?

      — commented July 14th 2012 by Freddie C
    • @Antonio could you told me that whether this would also work for yahoo fantasy sports api too?

      — commented January 10th 2013 by Muhammad Wahhab Mirza
  • Outstanding!!! Now I just got a test working without the OAuth in the Simulator, is this required when doing device testing? If so, where do the limiting items come into play.

    If not, I know Yahoo limits 5000/IP, does anyone have a good idea of how iPhones/Android Devices register IP's?

    Thanks again for the reply, it truly helps a ton!

    — answered March 19th 2010 by Conrad Fuhrman
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.