OAuthCalculatePostData() public static method

Calculates for form encoded POST data to be included in the body of an OAuth call.
This will include all non-OAuth parameters. The OAuth parameter will be included in the Authentication header.
public static OAuthCalculatePostData ( string>.Dictionary parameters ) : string
parameters string>.Dictionary
return string
        public async Task <OAuthRequestToken> OAuthRequestTokenAsync(string callbackUrl)
        {
            const string url = "https://www.flickr.com/services/oauth/request_token";

            IDictionary <string, string> parameters = new Dictionary <string, string>();

            FlickrResponder.OAuthGetBasicParameters(parameters);
            parameters.Add("oauth_callback", callbackUrl);
            parameters.Add("oauth_consumer_key", ApiKey);

            var sig = OAuthCalculateSignature("POST", url, parameters, null);

            parameters.Add("oauth_signature", sig);

            var data       = FlickrResponder.OAuthCalculatePostData(parameters);
            var authHeader = FlickrResponder.OAuthCalculateAuthHeader(parameters);

            var response = await FlickrResponder.DownloadDataAsync("POST", url, data, null, authHeader);

            return(OAuthRequestToken.ParseResponse(response));
        }
        public async Task <OAuthAccessToken> OAuthAccessTokenAsync(string requestToken, string requestTokenSecret, string verifier)
        {
            const string url = "https://www.flickr.com/services/oauth/access_token";

            if (verifier.Contains("://"))
            {
                var uri = new Uri(verifier);
                verifier =
                    uri.Query.Split(new[] { '&' })
                    .Select(s => s.Split(new[] { '=' }))
                    .First(s => s[0] == "oauth_verifier")[1];
            }
            IDictionary <string, string> parameters = new Dictionary <string, string>();

            FlickrResponder.OAuthGetBasicParameters(parameters);

            parameters.Add("oauth_consumer_key", ApiKey);
            parameters.Add("oauth_verifier", verifier);
            parameters.Add("oauth_token", requestToken);

            var sig = OAuthCalculateSignature("POST", url, parameters, requestTokenSecret);

            parameters.Add("oauth_signature", sig);

            var data       = FlickrResponder.OAuthCalculatePostData(parameters);
            var authHeader = FlickrResponder.OAuthCalculateAuthHeader(parameters);
            var response   = await FlickrResponder.DownloadDataAsync("POST", url, data, null, authHeader);

            var accessToken = FlickrNet.OAuthAccessToken.ParseResponse(response);

            // Set current access token.
            OAuthAccessToken       = accessToken.Token;
            OAuthAccessTokenSecret = accessToken.TokenSecret;

            return(accessToken);
        }