PHPackages                             neemzy/share-extension - 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. neemzy/share-extension

ActiveLibrary

neemzy/share-extension
======================

Twig extension providing social share links

1.0.0(10y ago)1313.7k11MITPHPPHP &gt;=5.4.0

Since Sep 9Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (6)Used By (1)

ShareExtension
==============

[](#shareextension)

Twig extension providing social sharing links

Why?
----

[](#why)

Using this library instead of widgets provided by social platforms will allow you to get rid of:

- JavaScript execution timing issues
- Appearance constraints
- Abusive user tracking

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

[](#installation)

```
composer require neemzy/share-extension

```

Usage
-----

[](#usage)

This library uses [PHP SocialShare](https://github.com/dunglas/php-socialshare) internally, and allows you to generate a sharing link and retrieve a share count for any of the providers it supports ([see the list](https://github.com/dunglas/php-socialshare#php-socialshare)).

You can also generate the contents for a `onclick` handler to make your sharing link a popup on JavaScript-capable browsers, which will use each provider's ideal popup size if available. The handler relies on the link's `href` attribute in order to be able to degrade gracefully, so be sure to use it in conjunction with the URL generation.

Provider-specific parameters (e.g. tweet contents for Twitter) are supported: [see the list](https://github.com/dunglas/php-socialshare/blob/master/examples/buttons.php).

```
use Neemzy\Twig\Extension\Share\ShareExtension;

// You can get a ready-to-use instance...
$shareExtension = ShareExtension::getInstance();

// ...or instantiate it yourself
$shareExtension = new ShareExtension($phpSocialShareInstance);

$twig->addExtension($shareExtension);
```

```
Share on Facebook
Share on Twitter with some text
Share on Google+ in a popup
Shared on Pinterest {{ share_count_pinterest(my_url) }} times.
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~17 days

Total

5

Last Release

3833d ago

Major Versions

0.2.2 → 1.0.02015-11-19

### Community

Maintainers

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

---

Top Contributors

[![neemzy](https://avatars.githubusercontent.com/u/1804389?v=4)](https://github.com/neemzy "neemzy (26 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")

### Embed Badge

![Health badge](/badges/neemzy-share-extension/health.svg)

```
[![Health](https://phpackages.com/badges/neemzy-share-extension/health.svg)](https://phpackages.com/packages/neemzy-share-extension)
```

PHPackages © 2026

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