GithubHelp home page GithubHelp logo

neuralnoise / socialshare Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linkorb/socialshare

0.0 2.0 0.0 172 KB

Retrieve sharing stats for any url for various social networks.

License: MIT License

PHP 100.00%

socialshare's Introduction

LinkORB SocialShare Library

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!

socialshare's People

Contributors

joostfaassen avatar

Watchers

James Cloos avatar Starbuck avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.