PHPackages                             sgmendez/socialcount - 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. sgmendez/socialcount

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

sgmendez/socialcount
====================

A PHP library get share count from social networks

v1.0.2(11y ago)4322BSD-2-ClausePHPPHP &gt;=5.3.3

Since Apr 1Pushed 11y ago2 watchersCompare

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

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

[![License](https://camo.githubusercontent.com/1063ff59e5b739f3be667d886da2704470e1b246ab0a0ee82c448c69cd29397e/68747470733a2f2f706f7365722e707567782e6f72672f73676d656e64657a2f736f6369616c636f756e742f6c6963656e73652e737667)](https://packagist.org/packages/sgmendez/socialcount)[![SensioLabsInsight](https://camo.githubusercontent.com/98a61f87198820d4053135233337505de6175ba79f6a708d24c5f4f153b9787f/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65653030373932322d316332652d343430352d396134362d3331653665666539616364362f6d696e692e706e67)](https://insight.sensiolabs.com/projects/ee007922-1c2e-4405-9a46-31e6efe9acd6)[![Latest Stable Version](https://camo.githubusercontent.com/d22b1e0f7e9b7f9ce4d9cf2c4770fd705f7cab57874cb77db9d579dc76ed3008/68747470733a2f2f706f7365722e707567782e6f72672f73676d656e64657a2f736f6369616c636f756e742f762f737461626c652e737667)](https://packagist.org/packages/sgmendez/socialcount)[![Total Downloads](https://camo.githubusercontent.com/b5094015556123b9cd0b630651de3f990fb306ab3065c75a1d99026634a9a6f0/68747470733a2f2f706f7365722e707567782e6f72672f73676d656e64657a2f736f6369616c636f756e742f646f776e6c6f6164732e737667)](https://packagist.org/packages/sgmendez/socialcount)[![Latest Unstable Version](https://camo.githubusercontent.com/6f9516dc27165bc1a96d0f9d0df284a8b42c83df9111154c30a4245f8f94956d/68747470733a2f2f706f7365722e707567782e6f72672f73676d656e64657a2f736f6369616c636f756e742f762f756e737461626c652e737667)](https://packagist.org/packages/sgmendez/socialcount)

Introduction
============

[](#introduction)

---

This PHP library get the share count for URI in Social Networks, like Facebook, Twitter, Linkedin, Google+, ...

Requirements
============

[](#requirements)

---

This library require: - PHP 5.3.3 or higher - sgmendez/json 1.0 or higher

Installation
============

[](#installation)

---

You can use [Composer](https://getcomposer.org) to use this library in your application.

If you don't have Composer yet, download it following the instructions on  or just run the following command:

```
curl -s http://getcomposer.org/installer | php

```

And then execute this command to add libary to your project:

```
$ composer require sgmendez/socialcount

```

Or require [`sgmendez/socialcount`](http://)into your `composer.json` file:

```
json
{
    "require": {
        "sgmendez/socialcount": "*"
    }
}

```

Tests
=====

[](#tests)

---

You can run the PHPUnit tests, in directory tests execute:

```
$ php phpunit.phar .

```

In this directory there are a copy of phpunit.phar for execution test

Examples
========

[](#examples)

---

```
php

$socialCount = new SocialCount();

$url = 'http://www.sgmendez.com/';

$fb = $socialCount->getCountFacebook($url);
$tw = $socialCount->getCountTwitter($url);
$li = $socialCount->getCountLinkedin($url);
$go = $socialCount->getCountGoogle($url);

echo 'FB: '.$fb.' | TW: '.$tw.' | LI: '.$li.' | GO: '.$go;

```

License
=======

[](#license)

---

Licensed under the BSD License:

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~1 days

Total

6

Last Release

4060d ago

Major Versions

v0.0.3 → v1.0.02015-04-06

### Community

Maintainers

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

---

Top Contributors

[![sgmendez](https://avatars.githubusercontent.com/u/464341?v=4)](https://github.com/sgmendez "sgmendez (11 commits)")

---

Tags

facebooktwitterlinkedinsharegooglepluscount

### Embed Badge

![Health badge](/badges/sgmendez-socialcount/health.svg)

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

###  Alternatives

[social-links/social-links

PHP library to generate share buttons

112338.6k2](/packages/social-links-social-links)[kartik-v/yii2-social

Module containing useful widgets for Yii Framework 2.0 that integrates social functionalities from DISQUS, Facebook, Google etc.

91256.5k8](/packages/kartik-v-yii2-social)[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)[ryannielson/shareable

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

222.8k](/packages/ryannielson-shareable)[jonom/silverstripe-share-care

Social media sharing previews and customisation for Silverstripe

2932.7k1](/packages/jonom-silverstripe-share-care)

PHPackages © 2026

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