PHPackages                             c975l/sharebuttons-bundle - 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. c975l/sharebuttons-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

c975l/sharebuttons-bundle
=========================

Provides share buttons in differents views, with possibility to provide url

v4.12.2(4mo ago)15731MITPHPPHP &gt;=8.0

Since Mar 4Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/975L/ShareButtonsBundle)[ Packagist](https://packagist.org/packages/c975l/sharebuttons-bundle)[ Docs](https://github.com/975L/ShareButtonsBundle)[ Fund](https://buymeacoff.ee/laurentmarquet)[ Fund](https://opencollective.com/laurent-marquet)[ RSS](/packages/c975l-sharebuttons-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (55)Used By (1)

ShareButtonsBundle
==================

[](#sharebuttonsbundle)

ShareButtonsBundle does the following:

- Defines buttons to share web page on different tools.

This Bundle relies on the use of [Bootstrap](http://getbootstrap.com/) and [Fontawesome](https://fontawesome.com).

[ShareButtonsBundle dedicated web page](https://975l.com/en/pages/sharebuttons-bundle).

[ShareButtonsBundle API documentation](https://975l.com/apidoc/c975L/ShareButtonsBundle.html).

Bundle installation
-------------------

[](#bundle-installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Use [Composer](https://getcomposer.org) to install the library

```
    composer require c975L/sharebuttons-bundle
```

### Step 2: Enable the Routes

[](#step-2-enable-the-routes)

Then, enable the routes by adding them to the `/config/routes.yaml` file of your project:

```
c975_l_share_buttons:
    resource: "@c975LShareButtonsBundle/Controller/"
    type:     annotation
    prefix: /
    #Multilingual website use the following
    #prefix: /{_locale}
    #defaults:   { _locale: '%locale%' }
    #requirements:
    #    _locale: en|fr|es
```

### Step 3: Integration with your website

[](#step-3-integration-with-your-website)

It is strongly recommended to use the [Override Templates from Third-Party Bundles feature](http://symfony.com/doc/current/templating/overriding.html) to integrate fully with your site.

For this, simply, create the following structure `app/Resources/c975LExceptionCheckerBundle/views/` in your app and then duplicate the file `layout.html.twig` in it, to override the existing Bundle file, then apply your needed changes, such as language, etc.

In `layout.html.twig`, it will mainly consist to extend your layout and define specific variables, i.e. :

```
{% extends 'layout.html.twig' %}

{# Defines specific variables #}
{% set title = 'ShareButtons' %}

{% block content %}
    {% block sharebuttons_content %}
    {% endblock %}
{% endblock %}
```

### Step 4: Made use of assets

[](#step-4-made-use-of-assets)

To use styles and javascript you have to include them from `public/css/` and `public/js/`:

```

```

### Step 5: Define configuration

[](#step-5-define-configuration)

You need to define the Role needed to access data and if you wish to save statistics of shares. You can do this by using `sharebuttons_config` Route or directly in your `/config/config_bundles.yaml`, in this case, do not forget to clear the cache after. Options are described in the file `/Resources/config/bundle.yaml`.

### How to use

[](#how-to-use)

ShareButtonsBundle use [Fontawesome](https://fontawesome.com) for icons, their svgs are included in the bundle to avoid having to link to fontawesome css/js.

ShareButtonsBundle is quite easy to use. You simply have to add the following code in your Twig templates, that uses the provided Twig Extension:

```
{{ sharebuttons(['SHARE1', 'SHARE2', 'SHARE3', etc.], 'STYLE[distinct|ellipse|circle|toolbar](default distinct)', 'ALIGNMENT[left|center|right](default center)', DISPLAY_ICON[true|false](default true), DISPLAY_TEXT[true|false](default false), 'URL') }}

{# If you only need "main" shares you can also use the 'main' keyword as in the following #}
{{ sharebuttons('main', 'STYLE[distinct|ellipse|circle|toolbar](default distinct)', 'ALIGNMENT[left|center|right](default center)', DISPLAY_ICON[true|false](default true), DISPLAY_TEXT[true|false](default false), 'URL') }}

{# The simpliest use is the following #}
{{ sharebuttons('main', 'STYLE[distinct|ellipse|circle|toolbar](default distinct)') }}
```

Use the Route `sharebuttons_dashboard` (url: "/sharebuttons/dashboard") to access Dashboard.

### Available networks

[](#available-networks)

You can use any the following name, in the Twig Extension explained above, for its corresponding network:

- facebook
- bluesky
- linkedin
- pinterest
- email
- blogger
- buffer
- delicious
- evernote
- reddit
- skype
- stumbleupon
- tumblr
- whatsapp
- wordpress

If this project **help you to reduce time to develop**, you can sponsor me via the "Sponsor" button at the top :)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance78

Regular maintenance activity

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

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

Recently: every ~24 days

Total

53

Last Release

120d ago

Major Versions

1.x-dev → v2.02022-07-25

2.x-dev → v3.02024-01-16

v3.0.4 → v4.02024-01-22

PHP version history (5 changes)v1.0PHP &gt;=5.5.9

v1.1PHP ^7

v1.6PHP \*

v2.0PHP ^8

v4.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5679e828a48e37afabd92da60ab8d78bf65a3bedc0f618ef3fddf92082840f52?d=identicon)[Laurent3170](/maintainers/Laurent3170)

---

Top Contributors

[![LaurentMarquet](https://avatars.githubusercontent.com/u/16478286?v=4)](https://github.com/LaurentMarquet "LaurentMarquet (51 commits)")

---

Tags

facebooksharesharingsocial-networksymfonysymfony-bundletwittersymfonybundlebuttonsshare

### Embed Badge

![Health badge](/badges/c975l-sharebuttons-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/c975l-sharebuttons-bundle/health.svg)](https://phpackages.com/packages/c975l-sharebuttons-bundle)
```

###  Alternatives

[ekreative/uuid-extra-bundle

Paramconverter, Normalizer and Form Type for Ramsey Uuid

18168.6k](/packages/ekreative-uuid-extra-bundle)

PHPackages © 2026

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