summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-11-27 22:00:12 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-11-27 22:00:12 -0800
commit7b394003dc2dfb8fa8aea6f8162b7d044d660ed1 (patch)
tree1584603df66cde8ce7c6f3912cc030f6e56802ab
parent910e188277da0223ce2349ffb81fe0b7e2a9d1c8 (diff)
parentc1a4ea9a2209dd5730977b4f29bb11616183161b (diff)
downloadDotNetOpenAuth-7b394003dc2dfb8fa8aea6f8162b7d044d660ed1.zip
DotNetOpenAuth-7b394003dc2dfb8fa8aea6f8162b7d044d660ed1.tar.gz
DotNetOpenAuth-7b394003dc2dfb8fa8aea6f8162b7d044d660ed1.tar.bz2
Adds facebook email retrieval to Facebook logins. Fixes #208
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
index 8cb5cc5..a8c121d 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
@@ -78,7 +78,8 @@ namespace DotNetOpenAuth.AspNet.Clients {
builder.AppendQueryArgs(
new Dictionary<string, string> {
{ "client_id", this.appId },
- { "redirect_uri", returnUrl.AbsoluteUri }
+ { "redirect_uri", returnUrl.AbsoluteUri },
+ { "scope", "email" },
});
return builder.Uri;
}
@@ -133,6 +134,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
{ "redirect_uri", NormalizeHexEncoding(returnUrl.AbsoluteUri) },
{ "client_secret", this.appSecret },
{ "code", authorizationCode },
+ { "scope", "email" },
});
using (WebClient client = new WebClient()) {
@@ -170,4 +172,4 @@ namespace DotNetOpenAuth.AspNet.Clients {
#endregion
}
-} \ No newline at end of file
+}