定制 linkorb/socialshare 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

linkorb/socialshare

Composer 安装命令:

composer require linkorb/socialshare

包简介

Retrieve sharing stats for any url for various social networks

README 文档

README

Retrieve sharing stats for any url for various social networks.

Simple example

$url = new LinkORB\Component\SocialShare\Url('http://google.com');
print_r($url->getShareCounts());

Output:

Array
(
    [pinterest] => Array
        (
            [count] => 10610
            [countlabel] => 10.6K
        )

    [twitter] => Array
        (
            [count] => 7485
            [countlabel] => 7.5K
        )

    [facebook] => Array
        (
            [id] => http://google.com
            [comments] => 133545
            [shares] => 2
            [likes] =>
            [talking_about_count] =>
            [were_here_count] =>
            [count] => 133547
            [countlabel] => 133.5K
        )

    [linkedin] => Array
        (
            [count] => 63420
            [countlabel] => 63.4K
        )

    [googleplus] => Array
        (
            [count] => 5142375
            [countlabel] => 5142.4K
        )
)

Features

  • PSR-0 compatible, works with composer and is registered on packagist.org
  • Optional caching support through any Doctrine CacheProvider (FileSystem, Memcached, etc..)
  • Support for twitter.com
  • Support for facebook.com
  • Support for linkedin.com
  • Support for pinterest.com
  • Support for plus.google.com

Installing

Check out composer for details about installing and running composer.

Then, add linkorb/socialshare to your project's composer.json:

{
    "require": {
        "linkorb/socialshare": "dev-master"
    }
}

Try the commandline utility:

There is a simple example commandline utility to test the functionality:

bin/console socialshare:urlsharecount http://google.com

This will retrieve all supported sharing stats, and output the resulting array to the console.

Contributing

Ready to build and improve on this repo? Excellent! Go ahead and fork/clone this repo and we're looking forward to your pull requests!

If you are unable to implement changes you like yourself, don't hesitate to open a new issue report so that we or others may take care of it.

Todo

  • Add support for more networks (Tumblr, QQ, etc...)

License

Please check LICENSE.md for full license information

Brought to you by the LinkORB Engineering team


Check out our other projects at linkorb.com/engineering.

Btw, we're hiring!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-29