Closed bboroda closed 9 years ago
Ah, well spotted!
Would you be up for adding the separate counts to the library?
Sure, but first maybe I could do a PR and fix the existing bug ?
That would be great, thanks.
On 4 February 2015 at 21:19, Boris Boroda notifications@github.com wrote:
Sure, but first maybe I could do a PR and fix the existing bug ?
— Reply to this email directly or view it on GitHub https://github.com/ollieglass/share-counter/issues/16#issuecomment-72941531 .
ollieglass.com @ollieglass https://twitter.com/ollieglass
@ollieglass - here we go https://github.com/ollieglass/share-counter/pull/17
Merged, thank you!
Here is an example:
2.2.0 :001 > require 'share-counter' => true 2.2.0 :002 > url='http://www.mybanktracker.com/news/improve-your-finances-end-of-year-budget-review' => "http://www.mybanktracker.com/news/improve-your-finances-end-of-year-budget-review" 2.2.0 :003 > counts = ShareCounter.selected url, [:twitter, :facebook, :linkedin, :googleplus] => {:twitter=>71, :facebook=>25, :linkedin=>273, :googleplus=>0} 2.2.0 :004 > counts.values.reduce(:+) => 369
However, if you look at something like sharedcount.com URL service and break down facebook services into sub-services, you'll get something like:
http://www.sharedcount.com/#url=http%3A%2F%2Fwww.mybanktracker.com%2Fnews%2Fimprove-your-finances-end-of-year-budget-review
Facebook
Likes: 25 Shares: 138 Comments: 2 Total: 165
So the likes are applied (25) instead of shares (138) in the above example.