madurmanov/yii2-vk-api-driver

Module that enables send request to vk api for Yii Framework 2.0.

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

pkg:composer/madurmanov/yii2-vk-api-driver

dev-master 2017-11-22 20:17 UTC

This package is not auto-updated.

Last update: 2025-10-16 23:41:56 UTC


README

Module that enables send request to vk api for Yii Framework 2.0.

Installation

composer require madurmanov/yii2-vk-api-driver "@dev"

AccessToken

  • 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

Configuration

'modules' => [
  'VkApiDriver' => [
    'class' => 'madurmanov\VkApiDriver\Module',
    'clientID' => 0,
    'ownerID' => 0,
    'accessToken' => ''
  ]
]

Usage

$VkApiDriver = Yii::$app->getModule('VkApiDriver');
$VkApiDriver->request('wall.post', 'GET', [
  'owner_id' => $VkApiDriver->ownerID,
  'from_group' => 0,
  'message' => ''
], true);

License

yii2-vk-api-driver is released under the MIT License. See the bundled LICENSE.md for details.