Module that enables send request to vk api for Yii Framework 2.0.
composer require madurmanov/yii2-vk-api-driver "@dev"
- Create standalone app https://vk.com/apps
- Execute next code with entered
clientID
parameter in module configuration
$VkApiDriver = Yii::$app->getModule('VkApiDriver');
var_dump($VkApiDriver->getAccessTokenUrl(['wall']));
- Follow to link and get access token for configurate
'modules' => [
'VkApiDriver' => [
'class' => 'madurmanov\VkApiDriver\Module',
'clientID' => 0,
'ownerID' => 0,
'accessToken' => ''
]
]
$VkApiDriver = Yii::$app->getModule('VkApiDriver');
$VkApiDriver->request('wall.post', 'GET', [
'owner_id' => $VkApiDriver->ownerID,
'from_group' => 0,
'message' => ''
], true);
yii2-vk-api-driver is released under the MIT License. See the bundled LICENSE.md
for details.