Skip to content

CodeIgniter library for get URL shares in social networks (Twitter, Facebook, Google+, Pinterest, LinkedIn and StumbleUpon).

Notifications You must be signed in to change notification settings

alemohamad/ci-social-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

CodeIgniter Library: Count URL shares

ci-social-stats

About this library

This CodeIgniter's Library is used to get the count of shares of an URL from social networks (Twitter, Facebook, Google+, Pinterest, LinkedIn and StumbleUpon).
Its usage is recommended for CodeIgniter 2 or greater.

Note: I recommend that you cache the results, so you won't exceed the limit of requests to each of the social networks. Ideally, do a query every 10 minutes or so.

Usage

$this->load->library('SocialStats');

$url = 'http://github.com';

$twitter_shares     = $this->socialstats->get_tweets($url);
$facebook_shares    = $this->socialstats->get_fb_shares($url);
$googleplus_shares  = $this->socialstats->get_plusones($url);
$pinterest_shares   = $this->socialstats->get_pins($url);
$linkedin_shares    = $this->socialstats->get_in_shares($url);
$stumbleupon_shares = $this->socialstats->get_stumble_views($url);
$tumblr_shares      = $this->socialstats->get_tumblr_shares($url);

Ale Mohamad

About

CodeIgniter library for get URL shares in social networks (Twitter, Facebook, Google+, Pinterest, LinkedIn and StumbleUpon).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages