I am trying to find an example of how to just tweet on my Twitter account using C # and DotNetOpenAuth. I want to do this from a WinForms application. The examples I found seem to use ASP.NET and WebForms. In particular, I get to the "verifier code". Here is the code that I still have:
private McMurryTokenManager TokenManager { get { McMurryTokenManager tokenManager = null; string consumerKey = ConsumerKey; string consumerSecret = ConsumerSecret; if (!string.IsNullOrEmpty(consumerKey)) { tokenManager = new McMurryTokenManager { ConsumerKey = consumerKey, ConsumerSecret = consumerSecret }; } return tokenManager; } } public Form1() { InitializeComponent(); var twitter = new DesktopConsumer(TwitterConsumer.ServiceDescription, TokenManager); string requestToken; twitter.RequestUserAuthorization(null, null, out requestToken); var accessTokenResponse = twitter.ProcessUserAuthorization(requestToken, null); }
I get an error when the verifier code cannot be null.
source share