private IList<friendlist> GetLists(bool isAsync, GetListsCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.friends.getLists" } }; if (isAsync) { SendRequestAsync<friends_getLists_response, IList<friendlist>>(parameterList, new FacebookCallCompleted<IList<friendlist>>(callback), state, "friendlist"); return null; } var response = SendRequest<friends_getLists_response>(parameterList); return response == null ? null : response.friendlist; }
/// <summary> /// Returns the identifiers for the current user's Facebook friend lists. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey)); /// api.Friends.GetListsAsync(AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(IList<friendlist> 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 list IDs returned are the lists associated with the subject user.</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 GetListsAsync(GetListsCallback callback, Object state) { GetLists(true, callback, state); }