A
A
Alex C2017-07-16 16:25:54
PHP
Alex C, 2017-07-16 16:25:54

I have a small problem and I need help. php?

I have a small problem and I need help.
After executing these lines:

$friends_array = Okru::makeRequest('friends.get');
      $friends_results = Okru::makeRequest('users.getInfo', array('format' => 'json', 'uids' => implode(',', $friends_array), 'fields' => 'name'));

The $friends_results variable will have the names of all friends.
But it doesn't work for all profiles.
some profiles do not return information about friends' names.
If I send this way
$friends_array = Okru::makeRequest('friends.get');
for($i=0; $i<count($friends_array); $i++ ){
$friends_results[$i] = Okru::makeRequest('users.getInfo', array('format' => 'json', 'uids' => $friends_array[$i], 'fields' => 'name'));
}

works well, but in this case I have to run this line for all friends in the party
. In this case, it takes a long time.
why the first method doesn't work on all accounts?
Please, help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2017-07-17
@buxtut

We read the docks: https://apiok.ru/dev/methods/rest/users/users.getInfo

Max. the number of identifiers is 100.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question