public ActionResult Twitter()
        {
            Dictionary <string, string> parameters = Request.Params.ToDictionary();

            string portalUri = _settings.PortalUri;
            var    callback  = new UriBuilder(portalUri)
            {
                Path = (Url.Action("twittercallback") ?? string.Empty).ToLowerInvariant()
            };

            IIdentityProvider identityProvider = _identityFactory.CreateIdentityProvider(ProviderType.Twitter);
            Uri authenticationUri;

            try
            {
                authenticationUri = identityProvider.GetAutheticationUri(parameters, callback.Uri);
            }
            catch (Exception e)
            {
                Trace.TraceError("Failed to receive authentication uri: {0}", e);
                return(RedirectToAction("Index", "Home"));
            }

            return(Redirect(authenticationUri.AbsoluteUri));
        }