diff --git a/GreenshotPicasaPlugin/PicasaCredentials.cs b/GreenshotPicasaPlugin/PicasaCredentials.cs index 046d188f9..83c6059b6 100644 --- a/GreenshotPicasaPlugin/PicasaCredentials.cs +++ b/GreenshotPicasaPlugin/PicasaCredentials.cs @@ -25,7 +25,7 @@ namespace GreenshotPicasaPlugin { /// You can set your own values here /// public static class PicasaCredentials { - public static string ConsumerKey = "@credentials_picasa_consumer_key@"; - public static string ConsumerSecret = "@credentials_picasa_consumer_secret@"; + public static string ClientId = "@credentials_picasa_consumer_key@"; + public static string ClientSecret = "@credentials_picasa_consumer_secret@"; } } diff --git a/GreenshotPicasaPlugin/PicasaUtils.cs b/GreenshotPicasaPlugin/PicasaUtils.cs index c8c7c296e..6faea9ac6 100644 --- a/GreenshotPicasaPlugin/PicasaUtils.cs +++ b/GreenshotPicasaPlugin/PicasaUtils.cs @@ -51,6 +51,14 @@ namespace GreenshotPicasaPlugin { if (result.TryGetValue("code", out code)) { GenerateToken(code, settings); } + string error; + if (result.TryGetValue("error", out error)) { + if ("access_denied" == error) { + throw new UnauthorizedAccessException("Access denied"); + } else { + throw new Exception(error); + } + } } ///