Permalink
Browse files

+ enabled partial FacebookAuthenticationResult.Parse for silverlight and

  windows phone application
  • Loading branch information...
prabirshrestha committed Nov 26, 2010
1 parent 4888b04 commit ac25b809468c4212aa3df6e01b677f2f28370fc4
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/FacebookSharp.Core/FacebookAuthenticationResult.cs
@@ -65,8 +65,6 @@ public bool IsUserDenied
}
}
-#if !SILVERLIGHT
-
public static FacebookAuthenticationResult Parse(string url)
{
return Parse(url, null);
@@ -103,8 +101,12 @@ public static FacebookAuthenticationResult Parse(string url, FacebookSettings fa
return new FacebookAuthenticationResult(paramters);
}
+ // for now don't allow to parse silverlight and windows phone web,
+ // coz ExchangeAccessTokenForCode needs to have async version.
+#if !(SILVERLIGHT || WINDOWS_PHONE)
else
- { // its from web
+ {
+ // its from web
var uri = new Uri(url);
var pars = FacebookUtils.ParseUrlQueryString(uri.Query);
@@ -145,12 +147,11 @@ public static FacebookAuthenticationResult Parse(string url, FacebookSettings fa
out expiresIn);
return new FacebookAuthenticationResult(accessToken, expiresIn, null);
}
-
- // if its parse error
- return new FacebookAuthenticationResult(string.Empty, 0, string.Empty);
}
- }
#endif
+ // if its parse error
+ return new FacebookAuthenticationResult(string.Empty, 0, string.Empty);
+ }
#region signed_request helpers

0 comments on commit ac25b80

Please sign in to comment.