Authentication problems

Topics: Developer Forum, User Forum
Nov 26, 2012 at 3:17 PM

Hello,

I want to thank you for this wonderful library, it has been of much use to me! 

I'm creating a small test website on which I want users to draw something and the drawing can then be uploaded to a central flickr. 


I also can't seem to figure out how to upload an image itself, I have tried the following guides:

  • http://weblogs.asp.net/robertxue/archive/2008/11/10/upload-your-picture-to-flickr-yourself.aspx
  • http://ctlabs.blogspot.in/2009/03/upload-photos-using-flickr-api-in-net.html
  • http://www.billsternberger.net/asp-net-mvc/store-images-on-flickr-using-flickrnet-dll-and-asp-net-mvc/

But with all of them I get problems with the authentication; I used the following code to authenticate and I always get the following error while authenticating: Invalid frob (108). Any ideas?

            flickr.ApiKey = ApiKey; //Replace with your real Flickr Key
            flickr.ApiSecret = SharedSecret;

            string frob = flickr.AuthGetFrob();

            string url = flickr.AuthCalcUrl(frob, FlickrNet.AuthLevel.Write | FlickrNet.AuthLevel.Read | FlickrNet.AuthLevel.Delete);
            System.Diagnostics.Process.Start(url);

            FlickrNet.Auth auth = flickr.AuthGetToken(frob);
            flickr.AuthToken = auth.Token;

            auth = flickr.AuthCheckToken(flickr.AuthToken);
            flickr.AuthToken = auth.Token;


I noticed flickr has changed it's authentication API so that you have to use OAUTH or something alike and that the auth can't be remembered any more? If this is true it's not possible to create my application, or am I seeing this wrong?

Thank you!

Coordinator
Nov 26, 2012 at 4:34 PM

I assume you are using ASP.Net. Basically you can't use Process.Start on the server, as that tries to start a copy of IE on your server.

You need to perform a Response.Redirect to the AuthCalcWebUrl() rather than AuthCalcUrl().

Take a look at the sample web app over at http://flickrnetsamples.codeplex.com/

Nov 28, 2012 at 3:37 PM

Thank you very much for the help :)