private async void GetContactList(string verifyCode)
        {
            if (isUserCancel)
            {
                return;
            }
            string contactResponse = null;
            try
            {
                HttpClient client = new HttpClient();

                byte[] headerByte = System.Text.Encoding.UTF8.GetBytes(clientId + ":" + clientSecret);
                string headerString = System.Convert.ToBase64String(headerByte);
                string authenHeader = "Basic " + headerString;
                client.DefaultRequestHeaders.Add("Authorization", authenHeader);

                HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "https://api.login.yahoo.com/oauth2/get_token");

                var keyValues = new List<KeyValuePair<string, string>>();
                keyValues.Add(new KeyValuePair<string, string>("client_id", clientId));
                keyValues.Add(new KeyValuePair<string, string>("client_secret", clientSecret));
                keyValues.Add(new KeyValuePair<string, string>("redirect_uri", "oob"));
                keyValues.Add(new KeyValuePair<string, string>("code", verifyCode));
                keyValues.Add(new KeyValuePair<string, string>("grant_type", "authorization_code"));
                request.Content = new FormUrlEncodedContent(keyValues);
                var response = await client.SendAsync(request);
                var content = await response.Content.ReadAsStringAsync();
                
                yahooAccessToken = new YahooAccessToken(content);
                
                string token = yahooAccessToken.AccessToken;
                string guid = yahooAccessToken.XoauthYahooGuid;
                string url = "https://social.yahooapis.com/v1/user/" + guid + "/contacts?format=json";

                HttpClient getContactClient = new HttpClient();
                HttpRequestMessage getContactRequest = new HttpRequestMessage(HttpMethod.Get, url);
                getContactClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

                var res = await getContactClient.SendAsync(getContactRequest);
                contactResponse = await res.Content.ReadAsStringAsync();
            }
            catch (Exception ex)
            {
                CheckInternetConnection();
            }
            if (contactResponse != null)
            {
                List<YahooContact> list = YahooContact.parseContactFromJson(contactResponse);
                ProcessYahooContacts(list);
            }
        }
        private void GetContactList(string verifyCode)
        {
            if(isUserCancel)
            {
                return;
            }
            string contactResponse = null;
            try
            {
                using (var client = new WebClient())
                {
                    byte[] headerByte = System.Text.Encoding.UTF8.GetBytes(clientId + ":" + clientSecret);
                    string headerString = System.Convert.ToBase64String(headerByte);
                    string authenHeader = "Basic " + headerString;

                    client.Headers.Set("Authorization", authenHeader);
                    var values = new NameValueCollection();
                    values["client_id"] = clientId;
                    values["client_secret"] = clientSecret;
                    values["redirect_uri"] = "oob";
                    values["code"] = verifyCode;
                    values["grant_type"] = "authorization_code";

                    var response = client.UploadValues("https://api.login.yahoo.com/oauth2/get_token", values);

                    var responseString = Encoding.Default.GetString(response);
                    yahooAccessToken = new YahooAccessToken(responseString);
                }

                string token = yahooAccessToken.AccessToken;
                string guid = yahooAccessToken.XoauthYahooGuid;
                string url = "https://social.yahooapis.com/v1/user/" + guid + "/contacts?format=json";

                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
                request.Headers["Authorization"] = "Bearer " + token;

                using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
                {
                    StreamReader reader = new StreamReader(response.GetResponseStream());
                    contactResponse = reader.ReadToEnd();
                }
            }
            catch (Exception ex)
            {
                CheckInternetConnection();
            }
            if (contactResponse != null)
            {
                List<YahooContact> list = YahooContact.parseContactFromJson(contactResponse);
                ProcessYahooContacts(list);
            }
        }
        private async void GetContactList(string verifyCode)
        {
            if (isUserCancel)
            {
                return;
            }

            string contactResponse = null;

            try
            {
                HttpClient client = new HttpClient();

                byte[] headerByte = System.Text.Encoding.UTF8.GetBytes(clientId + ":" + clientSecret);
                string headerString = System.Convert.ToBase64String(headerByte);
                string authenHeader = "Basic " + headerString;
                client.DefaultRequestHeaders.Add("Authorization", authenHeader);

                HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "https://api.login.yahoo.com/oauth2/get_token");

                var keyValues = new List<KeyValuePair<string, string>>();
                keyValues.Add(new KeyValuePair<string, string>("client_id", clientId));
                keyValues.Add(new KeyValuePair<string, string>("client_secret", clientSecret));
                keyValues.Add(new KeyValuePair<string, string>("redirect_uri", "oob"));
                keyValues.Add(new KeyValuePair<string, string>("code", verifyCode));
                keyValues.Add(new KeyValuePair<string, string>("grant_type", "authorization_code"));
                request.Content = new FormUrlEncodedContent(keyValues);
                var response = await client.SendAsync(request);
                var content = await response.Content.ReadAsStringAsync();

                yahooAccessToken = new YahooAccessToken(content);

                string token = yahooAccessToken.AccessToken;
                string guid = yahooAccessToken.XoauthYahooGuid;
                string url = "https://social.yahooapis.com/v1/user/" + guid + "/contacts?format=json";

                HttpClient getContactClient = new HttpClient();
                HttpRequestMessage getContactRequest = new HttpRequestMessage(HttpMethod.Get, url);
                getContactClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

                var res = await getContactClient.SendAsync(getContactRequest);
                contactResponse = await res.Content.ReadAsStringAsync();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
                CheckInternetConnection();

                if (currentLookup <= maxLookup)
                {
                    currentLookup++;
                    currentStep = STEP_ACCEPT;
                    isReload = true;
                    browser.Navigate(new Uri(YAHOO_OAUTH2_URL));
                }
                else
                {
                    NotifyDownloadStatus(DownloadStatus.ERROR_SENDING_REQUEST, "");
                    currentLookup = 1;
                }

                return;
            }

            if (contactResponse != null)
            {
                List<YahooContact> list = YahooContact.parseContactFromJson(contactResponse);
                ProcessYahooContacts(list);
            }
        }