private IList <string> CheckGrantedApiAccess(string permissions_apikey, bool isAsync, CheckGrantedApiAccessCallback callback, Object state) { var parameterList = new Dictionary <string, string> { { "method", "facebook.permissions.checkGrantedApiAccess" } }; Utilities.AddRequiredParameter(parameterList, "permissions_apikey", permissions_apikey); if (isAsync) { SendRequestAsync <permissions_checkGrantedApiAccess_response, IList <string> >(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <IList <string> >(callback), state, "permissions_checkGrantedApiAccess_response_elt"); return(null); } var response = SendRequest <permissions_checkGrantedApiAccess_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return(response == null ? null : response.permissions_checkGrantedApiAccess_response_elt); }
private IList<string> CheckGrantedApiAccess(string permissions_apikey, bool isAsync, CheckGrantedApiAccessCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.permissions.checkGrantedApiAccess" } }; Utilities.AddRequiredParameter(parameterList, "permissions_apikey", permissions_apikey); if (isAsync) { SendRequestAsync<permissions_checkGrantedApiAccess_response, IList<string>>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<IList<string>>(callback), state, "permissions_checkGrantedApiAccess_response_elt"); return null; } var response = SendRequest<permissions_checkGrantedApiAccess_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return response == null ? null : response.permissions_checkGrantedApiAccess_response_elt; }
/// <summary> /// This method returns the API methods to which the specified application has been given access. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret)); /// api.Session.UserId = Constants.UserId; /// api.Permissions.CheckGrantedApiAccessAsync(Constants.WebApplicationKey2, AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(IList<string> result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <param name="permissions_apikey">The API key of the application for which the check is being done.</param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>The method returns a List of strings listing all methods/namespaces for which access has been granted.</returns> public IList <string> CheckGrantedApiAccessAsync(string permissions_apikey, CheckGrantedApiAccessCallback callback, Object state) { return(CheckGrantedApiAccess(permissions_apikey, true, callback, state)); }
/// <summary> /// This method returns the API methods to which the specified application has been given access. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret)); /// api.Session.UserId = Constants.UserId; /// api.Permissions.CheckGrantedApiAccessAsync(Constants.WebApplicationKey2, AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(IList<string> result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <param name="permissions_apikey">The API key of the application for which the check is being done.</param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>The method returns a List of strings listing all methods/namespaces for which access has been granted.</returns> public IList<string> CheckGrantedApiAccessAsync(string permissions_apikey, CheckGrantedApiAccessCallback callback, Object state) { return CheckGrantedApiAccess(permissions_apikey, true, callback, state); }