Esempio n. 1
0
        private void RevokeAuthorization(bool isAsync, RevokeAuthorizationCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string> {
                { "method", "facebook.auth.revokeAuthorization" }
            };

            if (isAsync)
            {
                SendRequestAsync <auth_revokeAuthorization_response, bool>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <bool>(callback), state);
                return;
            }

            SendRequest(parameterList, !string.IsNullOrEmpty(Session.SessionKey));
        }
        private void RevokeAuthorization(bool isAsync, RevokeAuthorizationCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.auth.revokeAuthorization" } };

            if (isAsync)
            {
                SendRequestAsync<auth_revokeAuthorization_response, bool>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<bool>(callback), state);
                return;
            }

            SendRequest(parameterList, !string.IsNullOrEmpty(Session.SessionKey));
        }
Esempio n. 3
0
 /// <summary>
 /// If this method is called for the logged in user, then no further API calls can be made on that user's behalf until the user decides to authorize the application again.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Auth.RevokeAuthorizationAsync(AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(bool result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>If the revoke is successful, this will return true.</returns>
 public void RevokeAuthorizationAsync(RevokeAuthorizationCallback callback, Object state)
 {
     RevokeAuthorization(true, callback, state);
 }
 /// <summary>
 /// If this method is called for the logged in user, then no further API calls can be made on that user's behalf until the user decides to authorize the application again.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Auth.RevokeAuthorizationAsync(AsyncDemoCompleted, null);
 /// }
 /// 
 /// private static void AsyncDemoCompleted(bool result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>If the revoke is successful, this will return true.</returns>
 public void RevokeAuthorizationAsync(RevokeAuthorizationCallback callback, Object state)
 {
     RevokeAuthorization(true, callback, state);
 }