I have a problem with PhotobucketNet user login(I need user to login so I can upload a picture from HDD to his Photobucket account).
Photobucket photobucket = new Photobucket("myapikey", "myapisecret");
photobucket.LaunchUserLogin();
// the problem happens here
photobucket.RequestUserToken();
If I call RequestUserToken() it will happen immediately, so I'll get a crash cause user didn't logged in, and there is no event that's been raised after user logs in. Is there some variable(bool or something else) that I can check to see if user logged in - maybe to put it in a loop with timer? Also is their a way to know if user canceled logging in? I know that timer isn't a good solution, so if anyone has anything better as an idea, I'm open for any suggestions...
I've encountered the same problem today and i found your post while i was searching for solutions. Here is how i managed to solve the problem:
Firstly, i got the "user login url" and passed it to a form with a web browser control, called "Login".
Next, I got the url from this page,
which is the page after the login. If the web browser's url is that page, i asked the photobucket class (in my case Program.Service), to request the token.
The code from the Login form is something like this:
Now you just save the token and use it.