private IList<long> GetAppUsers(bool isAsync, GetAppUsersCallback callback, Object state) { var parameterList = new Dictionary<string, string> {{"method", "facebook.friends.getAppUsers"}}; if(isAsync) { SendRequestAsync<friends_getAppUsers_response, IList<long>>(parameterList, new FacebookCallCompleted<IList<long>>(callback), state, "uid"); return null; } var response = SendRequest<friends_getAppUsers_response>(parameterList); return response == null ? null : response.uid; }
/// <summary> /// Returns the identifiers for the current user's Facebook friends who have authorized the specific calling application. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey)); /// api.Friends.GetAppUsersAsync(AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(IList<long> 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>The friend IDs returned are those friends who have authorized the calling application, which is a subset of the friends returned from the friends.get method. If no friends are found, the method returns an empty friends_getAppUsers_response element.</returns> /// <remarks>The first array specifies one half of each pair, the second array the other half; therefore, they must be of equal size.</remarks> public void GetAppUsersAsync(GetAppUsersCallback callback, Object state) { GetAppUsers(true, callback, state); }