drmonkeyninja/social-share-url 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

drmonkeyninja/social-share-url

最新稳定版本:1.5.0

Composer 安装命令:

composer require drmonkeyninja/social-share-url

包简介

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

关键字:

README 文档

README

Build Status Latest Stable Version

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

  • Composer

Installation

Install via Composer:-

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:-

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

The MIT License.

统计信息

  • 总下载量: 5.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固