PHPackages                             socialconnect/vk-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. socialconnect/vk-sdk

ActiveLibrary[API Development](/categories/api)

socialconnect/vk-sdk
====================

0.4(10y ago)172.4k↑128.6%7MITPHPPHP &gt;=5.4

Since Aug 13Pushed 10y ago8 watchersCompare

[ Source](https://github.com/SocialConnect/vk)[ Packagist](https://packagist.org/packages/socialconnect/vk-sdk)[ RSS](/packages/socialconnect-vk-sdk/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

[![](https://camo.githubusercontent.com/6f1ccfe55a811f0d7bc6de605d57b79a1a700566bd216e116787521d7bc6b7df/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f766b2e706e67)](https://camo.githubusercontent.com/6f1ccfe55a811f0d7bc6de605d57b79a1a700566bd216e116787521d7bc6b7df/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f766b2e706e67) ВКонтакте SDK
===========================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-вконтакте-sdk)

[![Latest Stable Version](https://camo.githubusercontent.com/332ff3334b2935bd9371f2d5a244b0a55a8ec2d1f4297172c76cf89a6faf6314/68747470733a2f2f706f7365722e707567782e6f72672f536f6369616c436f6e6e6563742f766b2d73646b2f762f737461626c652e737667)](https://packagist.org/packages/SocialConnect/vk-sdk)[![Build Status](https://camo.githubusercontent.com/982da997028ff952dc772283db835d8626066659d880e7502977cb70da22c577/68747470733a2f2f7472617669732d63692e6f72672f536f6369616c436f6e6e6563742f766b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SocialConnect/vk)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5900e544eccdb353defb168d8401d776b9b77c942009436082d816f4394eb288/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f766b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/vk/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/2dc25f12853b2ce56b4835fd696fcce75bd6cc10065bf89aed30747ff3ab18e6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f766b2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/vk/?branch=master)[![License](https://camo.githubusercontent.com/a9b0b429b06359740b1be96371c57c0c848f4ca0ca818bc7dbdf4cbb72605e69/68747470733a2f2f706f7365722e707567782e6f72672f536f6369616c436f6e6e6563742f766b2f6c6963656e73652e737667)](https://packagist.org/packages/SocialConnect/vk)

Library for work with VK API.

Installation
------------

[](#installation)

Add a requirement to your `composer.json`:

```
{
    "require": {
        "socialconnect/vk": "~0.4"
    }
}
```

Run the composer installer:

```
php composer.phar install
```

How to use
----------

[](#how-to-use)

First you need to create service:

```
// Your Vk Application Settings
$appId = 123456;
$appSecret = 'secret';

$vkService = new \SocialConnect\Vk\Client($appId, $appSecret);
$vkService->setHttpClient(new \SocialConnect\Common\Http\Client\Curl());
```

Get user with specified $id:
----------------------------

[](#get-user-with-specified-id)

```
$user = $vkService->getUser(1);
var_dump($user);
```

Get users with specified array $ids:
------------------------------------

[](#get-users-with-specified-array-ids)

```
$users = $vkService->getUsers([1, 2]);
var_dump($users);
```

Customs methods
---------------

[](#customs-methods)

```
$parameters = [];
$result = $vkService->request('method/CustomMethod', $parameters);
if ($result) {
    var_dump($result);
}
```

Custom entities
---------------

[](#custom-entities)

```
class MyUserEntitiy extends \SocialConnect\Vk\Entity\User {
    public function myOwnMethod()
    {
        //do something
    }
}

$vkService->getEntityUser(new MyUserEntitiy());
$user = $vkService->getUser(1);

if ($user) {
    $user->myOwnMethod();
}
```

License
-------

[](#license)

This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~91 days

Total

10

Last Release

3912d ago

PHP version history (3 changes)0.1.1PHP ~5.3

0.1.6PHP ~5.4

0.4PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c019ea1f0133ad14d256163bc4d25a428b15f08083b15fdd380dc215e0e26177?d=identicon)[ovr](/maintainers/ovr)

---

Top Contributors

[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (162 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

phpsdkvkvkontaktevkontakte-apivkontakte-clientvkontakte-sdk

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/socialconnect-vk-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/socialconnect-vk-sdk/health.svg)](https://phpackages.com/packages/socialconnect-vk-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
