Hello, actually the essence of the matter is as follows - there is a method that reads the friends of the user in VKontakte. I put in the array of strings id of people to whom I need to go and read the list, but the program reads the list of friends only for the first user, and the rest does not upload, why? I do this:

public string [] FRIENDS_SEARCH() { List<string> tmp = new List<string>(); string[] logins = File.ReadAllText("D:/ГРУППЫ/БАЗА ДАННЫХ/Город/БД.txt").Split(' '); for (int o = 0; o < logins.Length; o++) { string lgn = logins[o]; var request = new HttpRequest(); request.UserAgent = HttpHelper.ChromeUserAgent(); request.Cookies = cook; request.AddParam("act", "filter_friends"); request.AddParam("age_from", "0"); request.AddParam("age_to", "0"); request.AddParam("al", "1"); request.AddParam("city", "374"); request.AddParam("sex", "0"); request.AddParam("uid", lgn); HttpResponse response = request.Post("https://vk.com/friends"); string[] t = response.ToString().Split('"'); for (int i = 1; i < t.Length; i++) if (t[i].Length > 5) tmp.Add("id" + t[i]); } return tmp.ToArray(); } 

xNet library is connected

Closed due to the fact that off-topic participants PashaPash , aleksandr barakin , Visman , Dmitriy Simushev , fori1ton 30 Aug '15 at 9:25 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - PashaPash, aleksandr barakin, Visman, Dmitriy Simushev, fori1ton
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Are you sure that Logins.length> 1? - Chad
  • Yes, in the debugger I checked - inkorpus
  • Something to me the response.ToString().Split('"') code response.ToString().Split('"') seems suspicious. - VladD
  • Well, reading is successful, the list of friends is returned, but the new page is not loaded - inkorpus
  • @inkorpus: Well, if this function is all right, then show the code with which the problem is. - VladD

0