예제 #1
0
        public string GetRequestTokenUrl(string callbackUrl)
        {
            const string requestTokenBaseUrl = "http://www.flickr.com/services/oauth/request_token";
            var simplickrConfig = _simplickrConfigurationProvider.GetConfig();
            string consumerKey = simplickrConfig.ApiKey;
            string consumerSecret = simplickrConfig.Secret;

            var oAuthUrlProvider = new OAuthUrlProvider()
                .Url(requestTokenBaseUrl)
                .ConsumerKey(consumerKey)
                .ConsumerSecret(consumerSecret)
                .Callback(callbackUrl);

            string requestTokenUrl = oAuthUrlProvider.GetSignedUrl();

            return requestTokenUrl;
        }
예제 #2
0
        public string GetRequestTokenUrl(string callbackUrl)
        {
            const string requestTokenBaseUrl = "http://www.flickr.com/services/oauth/request_token";
            var          simplickrConfig     = _simplickrConfigurationProvider.GetConfig();
            string       consumerKey         = simplickrConfig.ApiKey;
            string       consumerSecret      = simplickrConfig.Secret;

            var oAuthUrlProvider = new OAuthUrlProvider()
                                   .Url(requestTokenBaseUrl)
                                   .ConsumerKey(consumerKey)
                                   .ConsumerSecret(consumerSecret)
                                   .Callback(callbackUrl);

            string requestTokenUrl = oAuthUrlProvider.GetSignedUrl();

            return(requestTokenUrl);
        }
예제 #3
0
        public string GetAccessTokenUrl(string token, string tokenSecret, string verifier)
        {
            const string accessTokenBaseUrl = "http://www.flickr.com/services/oauth/access_token";
            var          simplickrConfig    = _simplickrConfigurationProvider.GetConfig();
            string       consumerKey        = simplickrConfig.ApiKey;
            string       consumerSecret     = simplickrConfig.Secret;

            var oAuthUrlProvider = new OAuthUrlProvider()
                                   .Url(accessTokenBaseUrl)
                                   .ConsumerKey(consumerKey)
                                   .ConsumerSecret(consumerSecret)
                                   .Token(token)
                                   .TokenSecret(tokenSecret)
                                   .Verifier(verifier);

            string accessTokenUrl = oAuthUrlProvider.GetSignedUrl();

            return(accessTokenUrl);
        }
예제 #4
0
        public string GetAccessTokenUrl(string token, string tokenSecret, string verifier)
        {
            const string accessTokenBaseUrl = "http://www.flickr.com/services/oauth/access_token";
            var simplickrConfig = _simplickrConfigurationProvider.GetConfig();
            string consumerKey = simplickrConfig.ApiKey;
            string consumerSecret = simplickrConfig.Secret;

            var oAuthUrlProvider = new OAuthUrlProvider()
                .Url(accessTokenBaseUrl)
                .ConsumerKey(consumerKey)
                .ConsumerSecret(consumerSecret)
                .Token(token)
                .TokenSecret(tokenSecret)
                .Verifier(verifier);

            string accessTokenUrl = oAuthUrlProvider.GetSignedUrl();

            return accessTokenUrl;
        }