public ActionResult Oauth() { var id = ""; if (Session["twitter_callback_guid"] != null) id = Session["twitter_callback_guid"].ToString(); var denied = Request.Params["denied"]; var oauth_token = Request.Params["oauth_token"]; var oauth_verifier = Request.Params["oauth_verifier"]; if (string.IsNullOrEmpty(denied) && !string.IsNullOrEmpty(oauth_token) && !string.IsNullOrEmpty(oauth_verifier)) { var titter = new TitterService(cunsomerKey, cunsomerSecret); var token = titter.GetOauthToken(oauth_verifier, oauth_token); if (token != null && Profile.IsAuthenticated && !string.IsNullOrEmpty(Profile.CurrentUser.Id)) { token.UserGuid = Profile.CurrentUser.Id; service.SaveUserTwitterToken(TwitterToken.ConvertToken(token)); } } return RedirectToAction("Index", "Home", new { id }); }