Consuming Yahoo! Web Services from Mac and iPhone

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Consuming Yahoo! Web Services from Mac and iPhone - Presentation Transcript

    1. Consuming Yahoo! Web Services from Mac and iPhone zach graves iphonedevcamp III
    2. zach graves YOS User Experience Design / Prototyping Focus on 3rd party developers & publishers. APIs, Web Services, Applications, ... twitter: @basictheory
    3. SDKs Current SDK offering: PHP ActionScript 3 Cocoa Python
    4. Cocoa SDK Objective-C 2.0 library Simple, Easy to use Transparent layer between you and the service Talk to YQL and Yahoo! Social Platform Use in any Mac or iPhone app Easy OAuth
    5. What this isn’t A UI for users to authenticate or login to your app.
    6. What this isn’t A UI for users to authenticate or login to your app. Instead a user logs into Yahoo and allows access to you. (OAuth)
    7. OAuth “An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications.”
    8. OAuth Secure mechanism for talking to ‘protected’ web- services. Web service provides access to user data or perform actions on behalf of the user.
    9. OAuth Understanding the implementation and the flow for your users.
    10. YOAuth *yet another oauth library* YOAuthConsumer YOAuthRequest YOAuthSignatureMethod YOAuthSignatureMethod_HMAC-SHA1 YOAuthSignatureMethod_PLAINTEXT YOAuthToken YOAuthUtil
    11. YOAuth *yet another oauth library* Give it your consumer credentials Signs your URL request Done
    12. YOSSocial Give it your OAuth credentials It will manage the entire OAuth process for you. Simple methods to create / resume a session. Automatically fetches tokens as required. Tokens are saved to user defaults. (or any other storage mechanism you want)
    13. YOSSocial // create a session YOSSession *session = [YOSSession sessionWithConsumerKey:@"dj0yJ...D1mMg" andConsumerSecret:@"226b...82f91" andApplicationId:@"9bTLz30"]; // check for any existing session data // (previously used access token) BOOL hasSession = [session resumeSession]; // perform any actions based on the result // ie: show an alert or button to sign in, // or start loading data if(hasSession) { // a valid session exists to fetch/insert data } else { // the user needs to login [session sendUserToAuthorizationWithCallback:nil]; }
    14. OAuth Flow
    15. Demo
    16. YQL select * from internet Expressive, SQL-like language to query, filter and join data across web services Apps run faster with fewer lines of code and a smaller network footprint.
    17. Using YQL in Your Apps Apps run faster with fewer lines of code and a smaller network footprint. Let Yahoo! fetch data and do the processing work for you. Move it off the device. Load all your data at once in one request.
    18. query.multi Open Table that allows you to pass thru a comma- separated list of YQL queries. Response is an array containing each result.
    19. query.multi
    20. query.multi select * from weather.forecast where location=98101
    21. query.multi YQLQueryRequest *yql = [[YQLQueryRequest alloc] initWithConsumer:session.consumer]; [yql query:@"select * from weather.forecast where location=98101" withDelegate:self];
    22. query.multi select * from weather.forecast where location=95136; select * from weather.forecast where location=94089; select * from weather.forecast where location=90401; select * from weather.forecast where location="SPXX0015"; select * from weather.forecast where location="UKXX0085"; select * from weather.forecast where location="USWA0395";
    23. query.multi NSArray *wLocations = [NSArray arrayWithObjects:@"95136", @"94089", @"90401", @"SPXX0015", @"UKXX0085", @"USWA0395", nil]; NSString *wMultiQuery = @""; for(int i=0;i<[wLocations count];i++) { NSString *wlocation = [wLocations objectAtIndex:i]; NSString *weatherQuery = [NSString stringWithFormat:@"select * from weather.forecast where location='%@';", wlocation]; wMultiQuery = [wMultiQuery stringByAppendingString: weatherQuery]; } NSString *yqlQuery = [NSString stringWithFormat:@"select * from query.multi where queries="%@";", wMultiQuery]; YQLQueryRequest *yql = [[YQLQueryRequest alloc] initWithConsumer:session.consumer]; [yql query: yqlQuery withDelegate:self];
    24. GitHub http://github.com/yahoo/ http://github.com/yql/
    25. Contact: Zach Graves zachg@yahoo-inc.com @basictheory http://developer.yahoo.com/social/sdk/ http://github.com/yahoo/yos-social-obj/
    SlideShare Zeitgeist 2009

    + basictheorybasictheory Nominate

    custom

    802 views, 4 favs, 0 embeds more stats

    - Using the Yahoo! Social SDK for Mac and iPhone ap more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 802
      • 802 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 11
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories