Asp.net mvc 2 and twitter authenticaton

Posted by arinte on Stack Overflow See other posts from Stack Overflow or by arinte
Published on 2010-05-20T11:00:12Z Indexed on 2010/05/20 11:20 UTC
Read the original article Hit count: 281

Filed under:
|
|

I am using OAuth (linq2twitter and DotNetOpenAuth) to allow a user to post comments via their twitter account. So when you do the authorization twitter does a callback, so the way linq2twitter does it is to set the callback to the page that did the req. So if the req came from blah.com\twit it will redirect to blah.com\twit. This leads me to have code like this:

public ActionResult Twit(){
        var qString = Request.QueryString;
        if (qString.Count <= 0){
        //do authorization
        }
        else{
        //do authentication
        }
}

So I would like to split it to this(seemingly both of these calls are done via GET):

 public ActionResult Twit(){}
 public ActionResult Twit(string token1, string token2){}

When I have this currently I get the .net yellow screen complaining about ambiguous action methods. How do I route this?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#