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. [Templating &amp; Views](/categories/templating)
4. /
5. neemzy/share-extension

ActiveLibrary[Templating &amp; Views](/categories/templating)

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

Twig extension providing social share links

1.0.0(10y ago)1313.8k11MITPHPPHP &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 today

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 75% 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

3880d 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)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[ktquez/laravel-tinymce

TinyMCE editor for Laravel and Lumen Framework

2525.4k](/packages/ktquez-laravel-tinymce)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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