PHPackages                             drmonkeyninja/social-share-url - 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. drmonkeyninja/social-share-url

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

drmonkeyninja/social-share-url
==============================

A standalone utility library for generating URLs to share content on numerous social media platforms.

1.5.0(1y ago)35.2k22MITPHPPHP &gt;=5.4

Since Feb 9Pushed 1y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (1)Versions (8)Used By (2)

SocialShareUrl
==============

[](#socialshareurl)

[![Build Status](https://camo.githubusercontent.com/648d1639b33d26a2f398f4065f5d18181d836e7f867c33a31c5ee79a0d840c3a/68747470733a2f2f7472617669732d63692e6f72672f64726d6f6e6b65796e696e6a612f736f6369616c2d73686172652d75726c2e737667)](https://travis-ci.org/drmonkeyninja/social-share-url) [![Latest Stable Version](https://camo.githubusercontent.com/53876e51a41b154ccd4a827f383f33558e09d9097f5187cfbf3fb9532de9f919/68747470733a2f2f706f7365722e707567782e6f72672f64726d6f6e6b65796e696e6a612f736f6369616c2d73686172652d75726c2f76657273696f6e)](https://packagist.org/packages/drmonkeyninja/social-share-url)

A standalone utility library for generating URLs to share content on numerous social media platforms.

Social Share currently supports Bluesky, Delicious, Digg, Evernote, Facebook, Friend Feed, Google Bookmarks, Hacker News, LinkedIn, Newsvine, Pinterest, Pocket, Reddit, Slashdot, simple email, StumbleUpon, Technorati, Tumblr, Twitter/X, VK, WhatsApp and Xing.

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

[](#requirements)

- Composer

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

[](#installation)

Install via [Composer](https://getcomposer.org):-

```
composer require drmonkeyninja/social-share-url ~1

```

Usage
-----

[](#usage)

To generate a social share URL simply use the `getUrl()` method passing it the name of the social network you want to link to and the URL of the page you want to share:-

```
use \drmonkeyninja\SocialShareUrl\SocialShareUrl;

$SocialShareUrl = new SocialShareUrl();
$url = $SocialShareUrl->getUrl('facebook', 'http://example.com');

```

You can pass further parameters to be included in the share URL by passing them as an array to the third parameter:-

```
$url = $SocialShareUrl->getUrl(
	'facebook',
	'http://example.com'
	['text' => 'Hello World']
);

```

Supported parameters include:-

- `text`
- `image`

A full list of the available social networks can be found in the `src/data/stubs.php` file. You can also return a full list of the social networks supported by `SocialShareUrl` by using the `getServices()` method:-

```
$services = $SocialShareUrl->getServices();

```

License
-------

[](#license)

The MIT License.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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 ~567 days

Recently: every ~618 days

Total

6

Last Release

541d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f481390bacd8d21d0caec9b0516971dad97f9f50fa8c8010460860ff76f6e8d?d=identicon)[drmonkeyninja](/maintainers/drmonkeyninja)

---

Top Contributors

[![drmonkeyninja](https://avatars.githubusercontent.com/u/357623?v=4)](https://github.com/drmonkeyninja "drmonkeyninja (29 commits)")[![amontrope](https://avatars.githubusercontent.com/u/32715632?v=4)](https://github.com/amontrope "amontrope (1 commits)")

---

Tags

facebookgooglelinkedintwittersocial

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/drmonkeyninja-social-share-url/health.svg)

```
[![Health](https://phpackages.com/badges/drmonkeyninja-social-share-url/health.svg)](https://phpackages.com/packages/drmonkeyninja-social-share-url)
```

###  Alternatives

[social-links/social-links

PHP library to generate share buttons

112338.6k2](/packages/social-links-social-links)[davmixcool/php-sentiment-analyzer

PHP Sentiment Analyzer is a lexicon and rule-based sentiment analysis tool that is used to understand sentiments in a sentence using VADER (Valence Aware Dictionary and sentiment Reasoner).

138151.7k1](/packages/davmixcool-php-sentiment-analyzer)[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)[davmixcool/laravel-meta-manager

Laravel Meta Manager is an SEO tool that is used to improve SEO of a website or specific page by adding recommended meta tags to your application.

15040.8k1](/packages/davmixcool-laravel-meta-manager)[fresns/fresns

Cross-platform general-purpose multiple content forms social network service software.

4841.5k](/packages/fresns-fresns)[devrabiul/laravel-seo-manager

Laravel SEO Manager is an SEO tool that improves SEO by adding recommended meta tags.

404.8k](/packages/devrabiul-laravel-seo-manager)

PHPackages © 2026

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