0

OpenAuth + iOS

I am struggling to get the Sports API and openAuth working for an iOS application. I tried using Google's openAuth framework as well as Yahoo's YOAuth iOS example. With the Yahoo example Safari gets launched and I get a code but I don't know where to use/enter that code in my app. 
Where would my iOS app make use of the auth code generated?

by
1 Reply
  • The code that we generate is a verifier -- the general idea is that you'd have the user re-input that into your application and use it as one of the arguments when you're asking Yahoo! for an access token on the user's behalf, like shown in lines 170-179 of the Getting Started sample code:

    http://developer.yahoo.com/fantasysports/guide/GettingStarted.html#GettingStarted-sample

    You can typically also do in-app redirects to pull the verifier directly from a redirected URL that stays within the application (if you have a redirect URL as part of your request flow, the user will get redirected to that w/ a "oauth_verifier" parameter appended, like:

    http://www.yahoo.com/?oauth_token=kmyybph&oauth_verifier=3gtmes

    ). I'm not as familiar with how to structure the redirect URL to get it to return back into the application, though.

    QUOTE(Dan @ 30 Oct 2011 5:14 PM)
    I am struggling to get the Sports API and openAuth working for an iOS application. I tried using Google's openAuth framework as well as Yahoo's YOAuth iOS example. With the Yahoo example Safari gets launched and I get a code but I don't know where to use/enter that code in my app. 
    Where would my iOS app make use of the auth code generated?
    0

Recent Posts

in Fantasy Sports API