PHPackages                             belt/soshare - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. belt/soshare

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

belt/soshare
============

URL shares

17PHP

Since Oct 26Pushed 11y ago1 watchersCompare

[ Source](https://github.com/beltphp/soshare)[ Packagist](https://packagist.org/packages/belt/soshare)[ RSS](/packages/belt-soshare/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Belt.`Soshare`
==============

[](#beltsoshare)

[![Software License](https://camo.githubusercontent.com/e62ec7d1eb7bad02a1aa2980ad66ff58afbae74e6ed93da09c07bff535c3f7b4/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f62656c742f736f73686172652e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/4336b04b59b20aafa485431d175277df8c4d514cb55a43b36aa9191e5801e00c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62656c747068702f736f73686172652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/beltphp/releases)[![Coverage Status](https://camo.githubusercontent.com/ff9cdfe85382cddf499e94361a6908cda1d7575d21dc8671eb05813aa8fa55f4/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f62656c747068702f736f73686172652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/beltphp/soshare/code-structure)[![Quality Score](https://camo.githubusercontent.com/8fc837983362ede4a116590f506d66a787a64e2604bfc4c507716d89f368f5c6/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62656c747068702f736f73686172652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/beltphp/soshare/)

> Shared URLs

Belt.`Soshare` is an utility library that allows you to easily check the number of shares an URL has for a given social network (or all social networks).

Supported networks:

- Twitter
- Facebook
- LinkedIn
- reddit
- Pinterest
- StumbleUpon

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

[](#installation)

Via Composer.

```
$ composer require belt/soshare
```

Usage
-----

[](#usage)

Usage is really simple (as usual).

```
use Belt\Soshare;
use Belt\Soshare\Reddit;
use Belt\Soshare\Twitter;
use Belt\Soshare\Facebook;
use Belt\Soshare\LinkedIn;
use Belt\Soshare\Pinterest;
use Belt\Soshare\StumbleUpon;

$soshare = new Soshare();
$soshare->addNetwork(new Reddit());
$soshare->addNetwork(new Twitter());
$soshare->addNetwork(new Facebook());
$soshare->addNetwork(new LinkedIn());
$soshare->addNetwork(new Pinterest());
$soshare->addNetwork(new StumbleUpon());

$soshare->getShares('http://apple.com');
$soshare->getShares('http://apple.com', ['twitter']); // Only get shares on Twitter
$soshare->getShares('http://apple.com', ['facebook', 'reddit']); // Only get shares on Facebook and Reddit

$soshare->getSharesByNetwork('http://apple.com'); // Get the shares seperated by network
// => [ 'twitter' => 32, 'facebook' => 1337, ... ]
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/beltphp/soshare/blob/master/CONTRIBUTING.md).

Credits
-------

[](#credits)

This library is based on [social-shares](https://github.com/Timrael/social_shares)for Ruby. If you're building something in Ruby and you need functionality like this, I recommend you check this library out!

License
-------

[](#license)

Please see [LICENSE](https://github.com/beltphp/soshare/blob/master/LICENSE).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c742d9a971e721439dab6897fa61e24052b4433845900a52480f66b90160793?d=identicon)[belt](/maintainers/belt)

---

Top Contributors

[![kleiram](https://avatars.githubusercontent.com/u/323498?v=4)](https://github.com/kleiram "kleiram (15 commits)")

### Embed Badge

![Health badge](/badges/belt-soshare/health.svg)

```
[![Health](https://phpackages.com/badges/belt-soshare/health.svg)](https://phpackages.com/packages/belt-soshare)
```

###  Alternatives

[tourze/workerman-yii2

541.3k](/packages/tourze-workerman-yii2)

PHPackages © 2026

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