I\'m creating an app with MVC4 that will authorize users using Twitter and lets them tweet from the app as well. I\'m able to get the user authenticated without a problem us
The DotNetOpenAuth.AspNet.Clients.TwitterClient
class only allows authentication, not authorization. So you wouldn't be able to post tweets as that user if you use that class.
Instead, you can use DotNetOpenAuth.ApplicationBlock.TwitterConsumer
, which does not share this limitation and you can even copy the source code for this type into your application and extend it as necessary.
You should be able to enhance the TwitterConsumer
class (once you've copied it into your own project) to implement the required interface so that the OAuthWebSecurity
class will accept it. Otherwise, you can just use TwitterConsumer
directly yourself to both authenticate and authorize your web app so the user only sees Twitter once but you get all the control you need. After all, folks using ASP.NET have been using TwitterConsumer
to both login and authorize for subsequent calls to Twitter for long before OAuthWebSecurity
even existed.