Example #1
0
        /// <summary>
        /// Following the 3-legged authorization, you can exchange a request token for an access token
        /// using this method. This is the third and final step of the authorization process.
        /// </summary>
        /// <param name="verifier">The verification key received after the user has accepted the app.</param>
        /// <returns>Returns an instance of <see cref="OAuthAccessTokenResponse"/> representing the response.</returns>
        /// <see>
        ///     <cref>https://dev.twitter.com/docs/auth/3-legged-authorization</cref>
        /// </see>
        public virtual OAuthAccessTokenResponse GetAccessToken(string verifier)
        {
            // Make the call to the API/provider
            SocialHttpResponse response = GetAccessTokenResponse(verifier);

            // Parse the response body
            OAuthAccessToken body = OAuthAccessToken.Parse(this, response.Body);

            // Parse the response
            return(OAuthAccessTokenResponse.ParseResponse(response, body));
        }
 /// <summary>
 /// Following the 3-legged authorization, you can exchange a request token for an access token
 /// using this method. This is the third and final step of the authorization process.
 /// </summary>
 /// <param name="verifier">The verification key received after the user has accepted the app.</param>
 /// <see cref="https://dev.twitter.com/docs/auth/3-legged-authorization"/>
 public virtual OAuthAccessToken GetAccessToken(string verifier)
 {
     return(OAuthAccessToken.Parse(GetAccessTokenQuery(verifier)));
 }