ollieglass / share-counter

Check how many times a page/URL has been shared on social networks and aggregators
MIT License
12 stars 6 forks source link

facebook service returns likes instead of shares #16

Closed bboroda closed 9 years ago

bboroda commented 9 years ago

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.

ollieglass commented 9 years ago

Ah, well spotted!

Would you be up for adding the separate counts to the library?

bboroda commented 9 years ago

Sure, but first maybe I could do a PR and fix the existing bug ?

ollieglass commented 9 years ago

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

bboroda commented 9 years ago

@ollieglass - here we go https://github.com/ollieglass/share-counter/pull/17

ollieglass commented 9 years ago

Merged, thank you!