getjump / VkApiPHP

[Abandoned] Library for work with API Vk.com
MIT License
201 stars 53 forks source link

Не обрабатывается запрос #20

Open loginov-rocks opened 8 years ago

loginov-rocks commented 8 years ago

Код из примера:

$vk->request('users.get', ['user_ids' => range(1, 100)])->each(function($i, $v) {
        if($v->last_name == '') return;
        print $v->last_name . '<br>';
});

Токен получен, установлен, ругается guzzle:

<br />
<b>Fatal error</b>:  Uncaught exception 'InvalidArgumentException' with message 'Invalid resource type: object' in D:\Projects\VK-Audios\vendor\guzzlehttp\streams\src\Stream.php:66
Stack trace:
#0 D:\Projects\VK-Audios\vendor\guzzlehttp\guzzle\src\Post\PostFile.php(71): GuzzleHttp\Stream\Stream::factory(Object(getjump\Vk\Response\Auth))
#1 D:\Projects\VK-Audios\vendor\guzzlehttp\guzzle\src\Post\PostFile.php(36): GuzzleHttp\Post\PostFile-&gt;prepareContent(Object(getjump\Vk\Response\Auth))
#2 D:\Projects\VK-Audios\vendor\guzzlehttp\guzzle\src\Message\MessageFactory.php(144): GuzzleHttp\Post\PostFile-&gt;__construct('access_token', Object(getjump\Vk\Response\Auth))
#3 D:\Projects\VK-Audios\vendor\guzzlehttp\guzzle\src\Message\MessageFactory.php(195): GuzzleHttp\Message\MessageFactory-&gt;addPostData(Object(GuzzleHttp\Message\Request), Array)
#4 D:\Projects\VK-Audios\vendor\guzzlehttp\guzzle\src\Message\MessageFactory.php(181): GuzzleHttp\Message\MessageFactory-&gt;add_body(Object(GuzzleHttp\Message\Request), Array)
#5 D:\Projects\VK-Audios\ven in <b>D:\Projects\VK-Audios\vendor\guzzlehttp\streams\src\Stream.php</b> on line <b>66</b><br />