public IEnumerable <FbContact> GetContacts() { Authenticate(); string call_id = GetNextCallNr(); Dictionary <string, string> requestParams = new Dictionary <string, string>(); requestParams.Add("method", "friends.get"); requestParams.Add("api_key", apiKey); requestParams.Add("session_key", sessionKey); requestParams.Add("call_id", call_id); requestParams.Add("v", "1.0"); var result = channel.GetContacts(apiKey, sessionKey, call_id, GenerateSignature(requestParams, sessionSecret)); XNamespace ns = result.GetDefaultNamespace(); List <string> friendsList = result.Elements().Select(e => e.Value).ToList(); for (int i = 0; i < friendsList.Count; i += 10) { // Creates lists like id1,id2,id3, etc var ids = String.Join(",", friendsList.Skip(i).Take(10).ToArray()); // Now get the desired data for user's contact to define the attributes of ChannelContact object foreach (var info in GetUsersInfo(ids)) { yield return(info); } } }