2017 © Pedro Peláez
 

library social-share-url

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

image

drmonkeyninja/social-share-url

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

  • Wednesday, May 2, 2018
  • by drmonkeyninja
  • Repository
  • 1 Watchers
  • 0 Stars
  • 301 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 41 % Grown

The README.md

SocialShareUrl

Build Status Latest Stable Version, (*1)

A standalone utility library for generating URLs to share content on numerous social media platforms., (*2)

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., (*3)

Requirements

  • Composer

Installation

Install via Composer:-, (*4)

composer require drmonkeyninja/social-share-url ~1

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:-, (*5)

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:-, (*6)

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

Supported parameters include:-, (*7)

  • 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:-, (*8)

$services = $SocialShareUrl->getServices();

License

The MIT License., (*9)

The Versions

02/05 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

social

02/05 2018

dev-dev

dev-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

social

02/05 2018

1.2.0

1.2.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

social

07/02 2018

1.1.0

1.1.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

social

09/02 2017

1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

social