library link-sharer
Link sharer helper for sharing links on social networks
michaelhall/link-sharer
Link sharer helper for sharing links on social networks
- Tuesday, December 26, 2017
- by michaelhall
- Repository
- 1 Watchers
- 0 Stars
- 400 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 5 Versions
- 11 % Grown
link-sharer
, (*1)
Link sharer helper for sharing links on social networks., (*2)
Requirements
Install with composer
``` bash
$ composer require michaelhall/link-sharer, (*3)
## Basic usage
```php
<?php
require __DIR__ . '/vendor/autoload.php';
use DataTypes\Net\Url;
use MichaelHall\LinkSharer\LinkSharer;
$url = Url::parse('https://example.com/');
// $text and $hashtags parameters are optional.
$text = 'My Webpage';
$hashtags = ['my', 'webpage'];
$linkSharer = new LinkSharer($url, $text, $hashtags);
// Prints https://twitter.com/intent/tweet?url=...
echo $linkSharer->getTwitterSharer();
// Prints https://www.facebook.com/sharer/sharer.php?u=...
echo $linkSharer->getFacebookSharer();
// And so on...
echo $linkSharer->getLinkedInSharer();
echo $linkSharer->getRedditSharer();
echo $linkSharer->getTumblrSharer();
License
MIT, (*4)
dev-develop
dev-develop
Link sharer helper for sharing links on social networks
Sources
Download
MIT
The Requires
The Development Requires
link
sharer
dev-master
9999999-dev
Link sharer helper for sharing links on social networks
Sources
Download
MIT
The Requires
The Development Requires
link
sharer
v2.0.0
2.0.0.0
Link sharer helper for sharing links on social networks
Sources
Download
MIT
The Requires
The Development Requires
link
sharer
v1.1.0
1.1.0.0
Link sharer helper for sharing links on social networks
Sources
Download
MIT
The Requires
The Development Requires
link
sharer
v1.0.0
1.0.0.0
Link sharer helper for sharing links on social networks
Sources
Download
MIT
The Requires
The Development Requires
link
sharer