PHPackages                             vichaunter/socialshare - 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. vichaunter/socialshare

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

vichaunter/socialshare
======================

Social share buttons, the easy way

06PHP

Since Jul 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/vichaunter/socialshare)[ Packagist](https://packagist.org/packages/vichaunter/socialshare)[ RSS](/packages/vichaunter-socialshare/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[SocialShare](https://github.com/vichaunter/socialshare) 1.0-rc1
----------------------------------------------------------------

[](#socialshare-10-rc1)

[![HitCount](https://camo.githubusercontent.com/11e0222e039399076f1d4986431ebba3ab03672439301aa6cebae4dcecbe70e3/687474703a2f2f686974732e6477796c2e636f6d2f7669636861756e7465722f736f6369616c73686172652e737667)](http://hits.dwyl.com/%7Busername%7D/%7Bproject-name%7D)

SocialShare enables developers to easily build social sharing buttons in their applications.

The main goal of SocialShare is to make as easy as possible adding share buttons for all social networks (and tools) in any website not depending on another packages.

Usage
-----

[](#usage)

SocialShare will provide a usage examples in short.

Anyway a simple way to use it is to call Buttons class with parameters as needed, or directly call each button:

```
//remember to use class namespace
$shareButtons = new Buttons(); //this will create all disponible buttons
$shareButtons->setUrl($currentUrl); //pass your current url from your script

foreach($shareButtons as $button){
    echo $button->getHtml();
}

//result will be links to each social network with href and this format
//Facebook
```

You can pass two attributes when call Buttons, restriction to wich social networks you want to see, and iconPack if is defined. For the moment only fontAwesome.

```
$shareButtons = new Buttons(['facebook','twitter'], 'fontAwesome');
$shareButtons->setUrl($currentUrl); //pass your current url from your script

foreach($shareButtons as $button){
    echo $button->getHtml();
}

//this will result
//
```

\####Example usage with Nette Framework.

In any presenter just add this lines:

```
$shareButtons = new Buttons(null, 'fontAwesome');
$shareButtons->setUrl($this->getHttpRequest()->getUrl()->absoluteUrl);
$this->template->shareButtons = $shareButtons->getAll();
```

Then in latte you can loop with:

```
{ifset $shareButtons}
    {foreach $shareButtons as $shareButton}
        {$shareButton->getHtml()|noescape}
    {/foreach}
{/ifset}
```

Requirements
------------

[](#requirements)

- PHP 5.x+

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

[](#installation)

To install SocialShare right now you can clone repositori in your project [Github](https://github.com/hybridauth/hybridauth/releases).

Versions Status
---------------

[](#versions-status)

VersionStatusRepositoryDocumentationPHP Version1.xMaintenancesocialsharesocialshare&gt;= 5.3Questions, Help and Support?
----------------------------

[](#questions-help-and-support)

For general questions (i.e, "how-to" questions), please left a message in Github issues tracker.

### License

[](#license)

SocialShare PHP Library is released under the terms of MIT License.

For the full Copyright Notice and Disclaimer, see [LICENSE](https://github.com/vichaunter/socialshare/blob/master/LICENSE).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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/166e4a9ea344efb637810dd2691026d056f576ab7405335d06aa7a922d1f7b15?d=identicon)[vichaunter](/maintainers/vichaunter)

---

Top Contributors

[![vichaunter](https://avatars.githubusercontent.com/u/9027583?v=4)](https://github.com/vichaunter "vichaunter (6 commits)")

### Embed Badge

![Health badge](/badges/vichaunter-socialshare/health.svg)

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

###  Alternatives

[kris/laravel-form-builder

Laravel form builder - symfony like

1.7k2.2M45](/packages/kris-laravel-form-builder)

PHPackages © 2026

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