PHP Classes

shares or g+ button count ?

Recommend this page to a friend!

      PHP Social Sharing  >  All threads  >  shares or g+ button count ?  >  (Un) Subscribe thread alerts  
Subject:shares or g+ button count ?
Summary:real share count method
Messages:1
Author:benone
Date:2014-03-03 02:17:03
 

  1. shares or g+ button count ?   Reply   Report abuse  
Picture of benone benone - 2014-03-03 02:17:03
just found that one and looks like your getGoogleShareCount method returns g+ counter instead of shares. not sure about that , please confirm.

bradsknutson.com/blog/get-google-sh ...

<?php
$shares_url = 'https://plus.google.com/ripple/details?url='. $url;
$response = file_get_contents( $shares_url );
$shares_match = preg_match('@([0-9]+) public shares@',$response,$matches);
$shares = $matches[1];
echo $shares;
?>