PHPackages                             evansims/socialworth - 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. evansims/socialworth

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

evansims/socialworth
====================

A simple PHP library for determining the popularity of a URL across social networks.

2.0.0(12y ago)1207.3k24[3 issues](https://github.com/evansims/socialworth/issues)MITPHPPHP &gt;=5.3.0

Since May 3Pushed 9y agoCompare

[ Source](https://github.com/evansims/socialworth)[ Packagist](https://packagist.org/packages/evansims/socialworth)[ Docs](http://github.com/evansims/socialworth)[ RSS](/packages/evansims-socialworth/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)Dependencies (2)Versions (2)Used By (0)

Socialworth
===========

[](#socialworth)

[![Latest Stable Version](https://camo.githubusercontent.com/21cfa189ca0844351bc8f710168b9fdff6f2c284f3e157d262d125f500f65c66/68747470733a2f2f706f7365722e707567782e6f72672f6576616e73696d732f736f6369616c776f7274682f762f737461626c652e706e67)](https://packagist.org/packages/evansims/socialworth) [![Build Status](https://camo.githubusercontent.com/3f10685da9ecaad03f5749aef283bc8ba2208f4c6c414f6fd1a108cdb622d5f8/68747470733a2f2f7472617669732d63692e6f72672f6576616e73696d732f736f6369616c776f7274682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/evansims/socialworth) [![Coverage Status](https://camo.githubusercontent.com/87d1018003aec1edc023379bd9b757346e406dfb662efea03637498f44d75948/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6576616e73696d732f736f6369616c776f7274682f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/evansims/socialworth?branch=master) [![License](https://camo.githubusercontent.com/75c1af9598f8ba0b7193155152ec10c79d38bfb8df4c53e0b29c9aa74b3f4d82/68747470733a2f2f706f7365722e707567782e6f72672f6576616e73696d732f736f6369616c776f7274682f6c6963656e73652e706e67)](https://packagist.org/packages/evansims/socialworth)

A simple PHP library for determining the popularity of a given URL by querying social network APIs.

It presently supports:

- Twitter (counts mentions and retweets)
- Facebook (counts likes, comments and shares)
- Google+ (+1s)
- Pinterest (shares)
- Reddit (counts submitted stories and upvotes)
- StumbleUpon views
- LinkedIn shares
- Hacker News *API service is currently offline.*
- Mozscape Backlinks *Retired.*

There a variety of use cases for this library; generating a list of your blog's most popular articles for optimizing placement, or featuring social network counters on your pages without relying on bloated external JavaScript includes.

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

[](#installation)

To add this package as a dependency for your project, simply add `evansims/socialworth` to your project's composer.json file. Here is an example of a minimal composer.json file:

```
{
    "require": {
        "evansims/socialworth": "*"
    }
}

```

Then run `composer install` to install the library. Composer generates a `vendor/autoload.php` file that you'll need to include in your project before invoking Socialworth:

```
require 'vendor/autoload.php';

```

Usage
-----

[](#usage)

To query all supported services for a URL:

```

```

Alternatively you can query just one service:

```

```

Or leave out specific services from your query:

```

```

The `all()` method will return an object that you can use to grab individual service results or find the combined popularity from the services:

```

```

Demo Script
-----------

[](#demo-script)

A demo script is provided that allows you to query the library from your browser, or the command line.

To call the script from the command line ...

```
$ php demo.php https://github.com/

```

Or, to query individual services ...

```
$ php demo.php --twitter --facebook https://github.com/

```

If the demo script is accessible from your web server, you can pass a url ...

```
http://localhost/path/to/demo.php?url=https://github.com/

```

Whether from the CLI or the browser, you will receive a JSON object back.

```
{
    "total": 48217,
    "twitter": 26582,
    "facebook": 15284,
    "pinterest": 157,
    "reddit": 5,
    "googleplus": 6049,
    "stumbleupon": 297,
    "linkedin": 0
}

```

---

This work was inspired by Jonathan Moore's gist:

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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

Unknown

Total

1

Last Release

4397d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3093?v=4)[Evan Sims](/maintainers/evansims)[@evansims](https://github.com/evansims)

---

Top Contributors

[![evansims](https://avatars.githubusercontent.com/u/3093?v=4)](https://github.com/evansims "evansims (13 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")

---

Tags

phpphp-librarysocial-networkfacebooktwitteranalyticsredditsocial networklinkedinpinterestgoogle plushackernewsstumbleuponpopularity

### Embed Badge

![Health badge](/badges/evansims-socialworth/health.svg)

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

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)[and/oauth

Simple and amazing OAuth library with many providers. Just try it out!

4645.2k2](/packages/and-oauth)[ryannielson/shareable

A Laravel 4 package to make it easy to add social sharing buttons to your application.

222.8k](/packages/ryannielson-shareable)

PHPackages © 2026

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