/// <summary> /// Asynchronously starts the authorization process /// </summary> /// <param name="authorizationCompleteCallback">Action you provide for when authorization completes.</param> public void BeginAuthorize(Action <TwitterAsyncResponse <object> > authorizationCompleteCallback) { if (IsAuthorized) { return; } if (GoToTwitterAuthorization == null) { throw new InvalidOperationException("GoToTwitterAuthorization must have a handler before calling BeginAuthorize."); } OAuthTwitter.GetRequestTokenAsync(new Uri(OAuthRequestTokenUrl), new Uri(OAuthAuthorizeUrl), "oob", false, GoToTwitterAuthorization, authorizationCompleteCallback); }
/// <summary> /// Asynchronously starts the authorization process /// </summary> /// <param name="authorizationCompleteCallback">Action you provide for when authorization completes.</param> public void BeginAuthorize(Uri callback, Action <TwitterAsyncResponse <object> > authorizationCompleteCallback) { if (IsAuthorized) { return; } if (PerformRedirect == null) { throw new InvalidOperationException("GoToTwitterAuthorization must have a handler before calling BeginAuthorize."); } OAuthTwitter.GetRequestTokenAsync(new Uri(OAuthRequestTokenUrl), new Uri(OAuthAuthorizeUrl), callback.ToString(), AuthAccessType, false, PerformRedirect, authorizationCompleteCallback); }