PHPackages                             subb98/vk-publisher - 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. subb98/vk-publisher

ActiveLibrary[API Development](/categories/api)

subb98/vk-publisher
===================

Auto-sending (crossposting) messages to VKontakte wall

2.1(6y ago)318MITPHPPHP ^7.1CI failing

Since Apr 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Subb98/VK-Publisher)[ Packagist](https://packagist.org/packages/subb98/vk-publisher)[ Docs](https://github.com/Subb98/VK-Publisher)[ RSS](/packages/subb98-vk-publisher/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

VK Publisher
============

[](#vk-publisher)

PHP library for auto-sending (crossposting) messages to VKontakte wall

[![Build Status](https://camo.githubusercontent.com/f1ea23b4b3b7e600651ae9030168a1c52592fe7b0cd34f717c90f8e88f94d0eb/68747470733a2f2f7472617669732d63692e6f72672f5375626239382f564b2d5075626c69736865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Subb98/VK-Publisher)[![StyleCI](https://camo.githubusercontent.com/552a4cb74f7d76b41596eb0b170c6973ce5e368c70fb9e6f51d03e70854e27ed/68747470733a2f2f7374796c6563692e696f2f7265706f732f3134313931313032332f736869656c64)](https://styleci.io/repos/141911023)[![Latest Stable Version](https://camo.githubusercontent.com/398a355881d8a1bc2ffb40f76b328e7944baf0c757087fb54bcaf1ac7e09afc7/68747470733a2f2f706f7365722e707567782e6f72672f7375626239382f766b2d7075626c69736865722f762f737461626c65)](https://packagist.org/packages/subb98/vk-publisher)[![Total Downloads](https://camo.githubusercontent.com/ab1383f3ac621eb546c04742bd9c832fbcde64460e8b610d85e08d693e84deae/68747470733a2f2f706f7365722e707567782e6f72672f7375626239382f766b2d7075626c69736865722f646f776e6c6f616473)](https://packagist.org/packages/subb98/vk-publisher)[![Latest Unstable Version](https://camo.githubusercontent.com/05d9c17b9c86181365b627254c2d60bd574efa4a8871625169f552cbdf9c81f2/68747470733a2f2f706f7365722e707567782e6f72672f7375626239382f766b2d7075626c69736865722f762f756e737461626c65)](https://packagist.org/packages/subb98/vk-publisher)[![License](https://camo.githubusercontent.com/dee6b6d188136dd82639776a22f8bcf2f111751594620729019ff14799bc55cb/68747470733a2f2f706f7365722e707567782e6f72672f7375626239382f766b2d7075626c69736865722f6c6963656e7365)](https://packagist.org/packages/subb98/vk-publisher)

[![](https://camo.githubusercontent.com/ae1bcdb32479dd64343f3c8448872ba22776726508f847a626bcae6c60eb4c47/68747470733a2f2f692e696d6775722e636f6d2f6d357749524b682e706e67)](https://camo.githubusercontent.com/ae1bcdb32479dd64343f3c8448872ba22776726508f847a626bcae6c60eb4c47/68747470733a2f2f692e696d6775722e636f6d2f6d357749524b682e706e67)

Features
--------

[](#features)

- Send a message or attachment (or all together) to the wall
- Upload photo (external or local) to album

Requirements
------------

[](#requirements)

- PHP 7.1 or above
- [cURL extension](http://php.net/manual/en/curl.installation.php)
- [JSON extension](http://php.net/manual/en/json.installation.php)

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

[](#installation)

```
composer require subb98/vk-publisher

```

Usage
-----

[](#usage)

### Getting access\_token

[](#getting-access_token)

#### For one step

[](#for-one-step)

1. Getting access\_token
    - Request example: `https://oauth.vk.com/authorize?client_id=1234567&display=page&redirect_uri=&scope=photos,wall,groups,offline&response_type=token&v=5.103`
    - Response example: `https://oauth.vk.com/blank.html#access_token=fe8c3650bdf7ad7185598c5a32c43a4e8d38bf1135e7d7920fdafd5dc5615949ba3fc7b461d6fd120b97f&expires_in=0&user_id=89012345`

#### Or for two steps

[](#or-for-two-steps)

1. Getting the code to get access\_token

    - Request example: `https://oauth.vk.com/authorize?client_id=1234567&display=page&redirect_uri=&scope=photos,wall,groups,offline&response_type=code&v=5.103`
    - Response example: `https://oauth.vk.com/blank.html#code=3b2a554d20bd48c360`
2. Getting access\_token

    - Request example: `https://oauth.vk.com/access_token?client_id=1234567&client_secret=9Wnk7UcEpeFAHhJYyyJg&redirect_uri=&code=3b2a554d20bd48c360`
    - Response example: `{"access_token":"fe8c3650bdf7ad7185598c5a32c43a4e8d38bf1135e7d7920fdafd5dc5615949ba3fc7b461d6fd120b97f","expires_in":0,"user_id":89012345}`

Note: don't use `scope=offline` if you fear access\_token is may be compromised.
See more: [Getting access token](https://vk.com/dev/authcode_flow_user)

### Sending a message to the wall

[](#sending-a-message-to-the-wall)

#### Without photo

[](#without-photo)

```
use Subb98\VkPublisher\Models\Settings;
use Subb98\VkPublisher\Services\PostSenderService;

$settings = (new Settings())
    ->setOwnerId(-169116756) // you need a minus sign if it's a group
    ->setAccessToken('fe8c3650bdf7ad7185598c5a32c43a4e8d38bf1135e7d7920fdafd5dc5615949ba3fc7b461d6fd120b97f')
    ->setApiVersion('5.103');

$postSender = new PostSenderService($settings);
$postSender->sendPostToWall("Message sends by \"VK Publisher\" PHP library\n\nLorem ipsum, dolor sit amet consectetur adipisicing elit. Tenetur unde libero quidem adipisci fugiat, error facilis ducimus, veritatis id amet nemo. Mollitia corporis vel quae rerum deleniti! Ducimus, corporis optio.");

```

#### With photo(s)

[](#with-photos)

```
use Subb98\VkPublisher\Services\PhotoUploaderService;

$settings->setAlbumId(256572563);

$photoUploader = new PhotoUploaderService($settings);

$photos[] = $photoUploader->uploadPhotoToAlbum('https://i.imgur.com/G82OZCz.jpg');
$photos[] = $photoUploader->uploadPhotoToAlbum(__DIR__ . '/img/peter-as-superman.jpg');
$postSender->sendPostToWall("Message sends by \"VK Publisher\" PHP library\n\nLorem ipsum, dolor sit amet consectetur adipisicing elit. Tenetur unde libero quidem adipisci fugiat, error facilis ducimus, veritatis id amet nemo. Mollitia corporis vel quae rerum deleniti! Ducimus, corporis optio.", $photos);

```

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~158 days

Total

3

Last Release

2276d ago

Major Versions

1.0.0 → 2.02020-02-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fc54d1bd63394295f1053a1730ed7bc7c701f671a8a50e31313543b655e746f?d=identicon)[Subb98](/maintainers/Subb98)

---

Top Contributors

[![Subb98](https://avatars.githubusercontent.com/u/7755984?v=4)](https://github.com/Subb98 "Subb98 (46 commits)")

---

Tags

php-librarysocial-networksvkvkontaktevkontakte-wallsocialvkvkontaktepostwall

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/subb98-vk-publisher/health.svg)

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

###  Alternatives

[pgrimaud/instagram-user-feed

This is a scraper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.

940657.1k5](/packages/pgrimaud-instagram-user-feed)[getjump/vk

Library for work with API Vk.com

20048.5k](/packages/getjump-vk)[vkcom/vk-php-sdk

VK PHP SDK

213803.4k17](/packages/vkcom-vk-php-sdk)[rezozero/mixedfeed

A PHP library to get social networks feeds and merge them

11130.4k](/packages/rezozero-mixedfeed)[jumper423/yii2-vk

Расширенная работа с API VK

301.6k](/packages/jumper423-yii2-vk)[edujugon/social-auto-post

PHP and Laravel 5 Package to post on Twitter

135.9k](/packages/edujugon-social-auto-post)

PHPackages © 2026

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