Ejemplo n.º 1
0
        private void GetRequestToken()
        {
            var context = new OffsiteContext(Constants.ConsumerKey, Constants.ConsumerSecret);
            //Get a Request Token
            var callbackUrl  = "http://localhost:9090/default.aspx?oauthreturn=true";
            var requestToken = context.GetRequestToken(callbackUrl);

            Session["requesttokenkey"]    = requestToken.TokenKey;
            Session["requesttokensecret"] = requestToken.TokenSecret;

            //Get the MySpace authentication page for the user to go to in order to authorize the Request Token.
            var authenticationUrl = context.GetAuthorizationUrl(requestToken, callbackUrl);

            Response.Redirect(authenticationUrl);
        }