I implemented this Facebook oAuth into my application. This worked some time but now it stopped. The code is the same:
FacebookOAuthResult result;
FacebookOAuthResult.TryParse(HttpContext.Current.Request.Url.AbsoluteUri, out result);
var ex = LoginAndOAuth.GetFacebookOAuthClient();
var parameters = new Dictionary<string, object>();
parameters["redirect_uri"] = ex.RedirectUri;
dynamic token = null;
try
{
token = ex.ExchangeCodeForAccessToken(result.Code, parameters);
}
Does Facebook changed something in their c# classes or ? Some help ?
You have to change your source code like this:
parameters.Add("redirect_uri", ex.RedirectUri);
You tried to set the value of a non-existent key, therefore you have to add it before you can access it the way you had it before.
After this step you can eventually use your code line for changing or getting the value saved under it.