Apr 12, 2011 at 2:34 PM
Edited Apr 12, 2011 at 2:35 PM
It might or might not be. You receive a
401 Unauthorized when authentication at Twitter fails. The bug had to do with a Twitter error in timing during OAuth authentication. Here's a couple ways to approach the problem:
1. If you can either switch from https to http or add a 15 second delay before CompleteAuthorization, then it sounds like the Twitter bug isn't fully fixed. In that case, grab the value of "X-Transaction-ID" from the failed request.
The X-Transaction-ID can be obtained from the TwitterContext instance's ResponseHeaders property (it's a dictionary of all the headers that Twitter returns) or from Fiddler. Give the X-Transaction-ID to Twitter so they can track down your
particular problem. You can use the URL above to add to their current issue or open a new issue. If this looks like the Twitter bug and you go this route, it would be good if you could post the URL here so that I can watch the issue too, in case
there's something I can do about it too.
2. If the 401 is happening all the time, you might have a problem with login credentials. Things to look at include:
- Double check your credentials to ensure they don't have spaces before or after (I've done this).
- Check your Twitter application credential settings to ensure you have read and write (occasionally, someone will have theirs set to read-only and try to do an update, which doesn't work because their credentials can't so a write).
- Make sure your credentials are correct. i.e. what if you've re-keyed and accidentally used old keys.
3. If it still isn't working, post a sample that reproduces your problem here. Don't include the whole program, just enough to see how you're implementing the OAuth dance and explain where the exception is raised. A stack trace, ex.ToString(),
might help too.