michaelhall/link-sharer
最新稳定版本:v3.0.0
Composer 安装命令:
composer require michaelhall/link-sharer
包简介
Link sharer helper for sharing links on social networks
README 文档
README
Link sharer helper for sharing links on social networks.
Requirements
- PHP >= 8.0
Install with composer
$ composer require michaelhall/link-sharer
Basic usage
<?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
统计信息
- 总下载量: 13.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-31