Exemplo n.º 1
0
        private group_members GetMembers(long gid, bool isAsync, GetMembersCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string> {
                { "method", "facebook.groups.getMembers" }
            };

            Utilities.AddRequiredParameter(parameterList, "gid", gid);

            if (isAsync)
            {
                SendRequestAsync(parameterList, new FacebookCallCompleted <group_members>(callback), state);
                return(null);
            }

            return(SendRequest <groups_getMembers_response>(parameterList));
        }
        private group_members GetMembers(long gid, bool isAsync, GetMembersCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.groups.getMembers" } };
            Utilities.AddRequiredParameter(parameterList, "gid", gid);

            if (isAsync)
            {
                SendRequestAsync(parameterList, new FacebookCallCompleted<group_members>(callback), state);
                return null;
            }

            return SendRequest<groups_getMembers_response>(parameterList);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Returns membership list data associated with a group.
 /// </summary>
 /// <param name="gid">Group ID for which to retrieve member list.</param>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Groups.GetMembersAsync(Constants.GroupId, AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(group_members 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>This method returns four (possibly empty) lists of users associated with a group, keyed on their associations. The members list will contain the officers and admins lists, but will not overlap with the not_replied list.</returns>
 public void GetMembersAsync(long gid, GetMembersCallback callback, Object state)
 {
     GetMembers(gid, true, callback, state);
 }
 /// <summary>
 /// Returns membership list data associated with a group.
 /// </summary>
 /// <param name="gid">Group ID for which to retrieve member list.</param>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Groups.GetMembersAsync(Constants.GroupId, AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(group_members 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>This method returns four (possibly empty) lists of users associated with a group, keyed on their associations. The members list will contain the officers and admins lists, but will not overlap with the not_replied list.</returns>
 public void GetMembersAsync(long gid, GetMembersCallback callback, Object state)
 {
     GetMembers(gid, true, callback, state);
 }