belt/soshare 问题修复 & 功能扩展

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

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

belt/soshare

Composer 安装命令:

composer require belt/soshare

包简介

URL shares

README 文档

README

Software License Build Status Coverage Status Quality Score

Shared URLs

Belt.Soshare is an utility library that allows you to easily check the number of shares an URL has for a given social network (or all social networks).

Supported networks:

  • Twitter
  • Facebook
  • LinkedIn
  • reddit
  • Pinterest
  • StumbleUpon

Installation

Via Composer.

$ composer require belt/soshare

Usage

Usage is really simple (as usual).

use Belt\Soshare;
use Belt\Soshare\Reddit;
use Belt\Soshare\Twitter;
use Belt\Soshare\Facebook;
use Belt\Soshare\LinkedIn;
use Belt\Soshare\Pinterest;
use Belt\Soshare\StumbleUpon;

$soshare = new Soshare();
$soshare->addNetwork(new Reddit());
$soshare->addNetwork(new Twitter());
$soshare->addNetwork(new Facebook());
$soshare->addNetwork(new LinkedIn());
$soshare->addNetwork(new Pinterest());
$soshare->addNetwork(new StumbleUpon());

$soshare->getShares('http://apple.com');
$soshare->getShares('http://apple.com', ['twitter']); // Only get shares on Twitter
$soshare->getShares('http://apple.com', ['facebook', 'reddit']); // Only get shares on Facebook and Reddit

$soshare->getSharesByNetwork('http://apple.com'); // Get the shares seperated by network
// => [ 'twitter' => 32, 'facebook' => 1337, ... ]

Contributing

Please see CONTRIBUTING.

Credits

This library is based on social-shares for Ruby. If you're building something in Ruby and you need functionality like this, I recommend you check this library out!

License

Please see LICENSE.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2014-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固