pnixx / vk-php-sdk
Vkontakte PHP SDK
Installs: 17 844
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: >=5.5.0
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2024-10-26 17:04:32 UTC
README
Require:
- PHP 5.5
- Composer (Optional)
The VK Platform http://vk.com/dev is a set of APIs that make your application more social.
##Install
composer require pnixx/vk-php-sdk
Usage
To create a new instance of VKontakte and make api calls:
<?
//The constructor
$vk = new VK($access_token);
//Set user online
$vk->method('account.setOnline');
//Upload photo
$photo = $vk->uploadImage('/path/to/file');
//Wall posting
$response = $vk->method('wall.post', [
'message' => urlencode('Hello world'),
'attachments' => $photo
]);