예제 #1
0
        //private static string GetConfigValue(System.Configuration.Configuration config, string key)
        //{
        //  string str = (string) null;
        //  KeyValueConfigurationElement setting = config.AppSettings.Settings[key];
        //  if (setting != null)
        //    str = setting.Value;
        //  return str;
        //}

        public string GetAccessToken()
        {
            if (string.IsNullOrEmpty(this.AccessToken))
            {
                this.AccessToken = MPCredentials.GetAccessToken(this);
            }
            return(this.AccessToken);
        }
예제 #2
0
 /// <summary>
 /// Get the access token pointing to OAuth.
 /// </summary>
 /// <returns>A valid access token.</returns>
 public static string GetAccessToken()
 {
     if (String.IsNullOrEmpty(AccessToken))
     {
         AccessToken = MPCredentials.GetAccessToken();
     }
     return(AccessToken);
 }