Generating token from mini-token (mobile)

Topics: Developer Forum, User Forum
Mar 29, 2011 at 8:55 AM

First of all, thank you very much for making this awesome library! :)

I'm working on a Windows Phone 7 app, and I'm having some troubles when I'm trying to use a method that requires (apiKey, sharedSecret, token). My problem is the token. I've set up the app in Flickr, got the api and secret key, set it to mobile, and I have the link that points to the 9 digit mini-token. But I don't fully understand how to put this together to make the "token" required to make the calls. It would be great if you could throw out a small example on how to do this :) Also, do I need the "frob" on mobile apps?

Mar 29, 2011 at 9:56 AM

Firstly, if you have the minitoken then you pass that to the Flickr.AuthGetFullTokenAsync method to get the full token. Frob's aren't used for mobile authentication.

Windows Phone 7 and other smartphones don't need to use Mobile authentication - I'd recommend using desktop for windows phone 7. 

Get a frob from Flickr.AuthGetFrobAsync, and then calculate the URL with Flickr.AuthCalc. Create an embedded web browser control on a page and load that URL up. Instruct the user to log into Flickr and authenticate your app. Once they have done that have them click a button and then call Flickr.AuthGetTokenAsync to get the final token.

I have got a sample app here:

It might not work fully as I haven't updated it to the release version of the WP7 tools, but it should give you some help I hope.

I hope that helps.


Mar 29, 2011 at 10:15 AM

Thank you very much! I will try it when I get home from work tonght :) It's a bit new to me to work with async calls, having some problems figuring out how to "wait" for the async calls to finish, how to determine when they are finished. But I hope I'll figure it out :)

Mar 29, 2011 at 10:34 AM

Took a quick look at your project, and I'll get the things i wondered about from there, thanks a bunch! :)