public BeginAuthenticate ( [ code, [ redirectUri, AsyncCallback cb, object state ) : IAsyncResult | ||
code | [ | a verification string passed in the query string argument |
redirectUri | [ | a url which was passed to |
cb | AsyncCallback | a callback to call upon operation is completed. |
state | object | the user state to pass to the callback. |
return | IAsyncResult |
public IAsyncResult BeginAuthenticate([NotNull] string code, [NotNull] string redirectUri, AsyncCallback cb, object state)
{
if (String.IsNullOrEmpty(redirectUri))
throw new ArgumentNullException("redirectUri");
if (String.IsNullOrEmpty(code))
throw FacebookApi.Nre("code");
return NewApiClient().BeginRequest(
c_oauthTokenUrl,
HttpVerb.Post,
new Dictionary<string, string>
{
{"client_id", _appId},
{"client_secret", _appSecret},
{"redirect_uri", redirectUri},
{"code", code}
},
cb, state);
}