diff options
author | Thomas Holloway <nyxtom@gmail.com> | 2013-04-22 17:13:57 -0600 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-26 09:39:40 -0700 |
commit | 7af5e055d9b92629344a87886a097e0c99fe5f5e (patch) | |
tree | d3e97ed7257114e86fbed027c779d63ab646f6eb /src | |
parent | ced7d307a7801de9e8fed39c8d470b525e8b94f1 (diff) | |
download | DotNetOpenAuth-7af5e055d9b92629344a87886a097e0c99fe5f5e.zip DotNetOpenAuth-7af5e055d9b92629344a87886a097e0c99fe5f5e.tar.gz DotNetOpenAuth-7af5e055d9b92629344a87886a097e0c99fe5f5e.tar.bz2 |
Adding scope parameter for facebook client
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs index a8c121d..2308736 100644 --- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs +++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs @@ -39,6 +39,11 @@ namespace DotNetOpenAuth.AspNet.Clients { /// </summary> private readonly string appSecret; + /// <summary> + /// The scope. + /// </summary> + private readonly string scope; + #endregion #region Constructors and Destructors @@ -52,13 +57,14 @@ namespace DotNetOpenAuth.AspNet.Clients { /// <param name="appSecret"> /// The app secret. /// </param> - public FacebookClient(string appId, string appSecret) + public FacebookClient(string appId, string appSecret, string scope = "email") : base("facebook") { Requires.NotNullOrEmpty(appId, "appId"); Requires.NotNullOrEmpty(appSecret, "appSecret"); this.appId = appId; this.appSecret = appSecret; + this.scope = scope; } #endregion @@ -79,7 +85,7 @@ namespace DotNetOpenAuth.AspNet.Clients { new Dictionary<string, string> { { "client_id", this.appId }, { "redirect_uri", returnUrl.AbsoluteUri }, - { "scope", "email" }, + { "scope", this.scope }, }); return builder.Uri; } |