Coder Social home page Coder Social logo

crazy-max / cwssharecount Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 4.0 248 KB

PHP class to get social share count for Delicious, Facebook, Google+, Linkedin, Pinterest, Reddit, StumbleUpon and Twitter.

License: MIT License

PHP 100.00%
php linkedin pinterest delicious stumbleupon reddit facebook twitter google-plus share

cwssharecount's Introduction

Latest Stable Version Minimum PHP Version Build Status Code Quality Become a sponsor Donate Paypal

⚠️ Abandoned project

This project is not maintained anymore and is abandoned. Feel free to fork and make your own changes if needed.

Thanks to everyone for their valuable feedback and contributions.

About

PHP class to get social share count for Delicious, Facebook, Google+, Linkedin, Pinterest, Reddit, StumbleUpon and Twitter.

Installation

composer require crazy-max/cws-share-count

And download the code:

composer install # or update

Getting started

See tests/test.php file sample to help you.

Example

Methods

getAll - Get all social share count.
getDeliciousCount - Get delicious social share count.
getFacebookCount - Get facebook social share count.
getGooglePlusCount - Get google plus social share count.
getLinkedinCount - Get linkedin social share count.
getPinterestCount - Get pinterest social share count.
getRedditCount - Get reddit social share count.
getStumbleuponCount - Get stumbleupon social share count.
getTwitterCount - Get twitter social share count.
getError - Get the last error.

How can I help ?

All kinds of contributions are welcome 🙌! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬 You can also support this project by becoming a sponsor on GitHub 👏 or by making a Paypal donation to ensure this journey continues indefinitely! 🚀

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.

cwssharecount's People

Contributors

crazy-max avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cwssharecount's Issues

Facebook REST API is deprecated

Since August 7, 2016 > REST API is deprecated for versions v2.1 and higher (12)

To fix this bug :

For the case self::SN_FACEBOOK:
Replace :
$api_url = "http://api.facebook.com/restserver.php?v=1.0&method=links.getStats&urls=" . urlencode($url) . "&format=json";
By :
$api_url = "http://graph.facebook.com/?id=" . urlencode($url);

AND

Replace :
if (isset($json[0]['total_count'])) { $result = intval($json[0]['total_count']); }
By :
if (isset($json['share']['share_count'])) { $result = intval($json['share']['share_count']); }

Have a nice day :)

Twitter Share Count

Twitter Share count is not working? Is this a known bug? I think the API endpoint might be deprecated.

Problem with Twitter

Hi and thx for your script.
There is a problem with Twitter count since 10 days...
Thx for your help.

verbose par défaut

Je pense que le verbose par défaut devrait plutôt être sur CWSSC_VERBOSE_QUIET.
C'est une librairie, donc à la base on veut aucun affichage et juste récupérer les valeurs via la méthode.

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.