composer require oleg-chulakov-studio/yii2-vkapi
Or add this code into require section of your composer.json and then call composer update in console
"oleg-chulakov-studio/yii2-vkapi": "*"
In configuration file do
<?php
'components' => [
'class' => OlegChulakovStudio\YiiVkComponent::className(),
'clientId' => '',
'secretCode' => '',
'accessToken' => '',
'apiVersion' => '5.67'
]
?>
Use as simple component
<?php
$responseData = Yii::$app->YiiVk->request('newsfeed.search', [
'count' => 100,
'q' => '#tag',
'extended' => true,
]);
?>