AyumuKasuga / SocialShare

jQuery plugin for creating custom like buttons and like counters
MIT License
143 stars 44 forks source link

Not a issue, just showing what i did with your great share counter #25

Open onigetoc opened 8 years ago

onigetoc commented 8 years ago

I wanted to have a good share counter and i find SocialShare, but i was not happy with the button look. Then i mixed 4 great scripts found on Github to do cool sharing buttons

Github project: https://github.com/onigetoc/Social-Share-Buttons-Counter Demo: https://cdn.rawgit.com/onigetoc/Social-Share-Buttons-Counter/master/demo-bootstrap.html

FZambia commented 8 years ago

Wow, this looks beautiful, thanks for sharing!

onigetoc commented 8 years ago

Thank you, i Think there's more api counter to add like Reddit https://www.reddit.com/dev/api/#GET_api_info It's sad that Twitter stopped to share their sharing counter api.

AyumuKasuga commented 8 years ago

Looks really great, thanks for using SocialShare :)

onigetoc commented 8 years ago

@AyumuKasuga I wanted to add the Reddit counter myself and may be the Github Stars but i hope that the owner will do it :)

AyumuKasuga commented 8 years ago

@onigetoc I will research this today (or tomorrow) and if it possible counter will be added.

AyumuKasuga commented 8 years ago

Hello again, @onigetoc ! Reddit has api method this api method which returns data with topics when link found, and we can count topics and return this number... But unfortunately this returns maximum 25 objects. image So we can't use this.

Also reddit has buttons, and even if we could extract data about points from button, it would not be a share counter number, it would be just reddit's rating (points).

If you know way to get shares number from reddit, please let me know.

onigetoc commented 8 years ago

@AyumuKasuga Because i already saw somewhere a reddit api to request from a url a count.

Here a example: https://www.reddit.com/api/info.json?callback=jQuery2140596095916138063_1439882724004&limit=1&url=http://www.livemint.com/Money/MML9OZRwaACyEhLzUNImnO/The-richest-1-of-Indians-now-own-584-of-wealth.html

with limit=1 score is about: 6792

From data => children => data=> score

i think you do not have to loop the second data but do something like: .data.children.data['score']

onigetoc commented 8 years ago

Reddit: with limit=1 score is about: 6792

From data => children => data=> score

i think you do not have to loop the second data but do something like: .data.children.data['score']

AyumuKasuga commented 8 years ago

@onigetoc It's great, but again it's just summarized points of posts with this link. Actual count of posts with this link is 3 (for this moment) image

For other sources we show count of shares and it will be not correct to show points for reddit.

onigetoc commented 8 years ago

Hi, when i do the json, i think the first one would be ok. Probably the most popular is the first with limit=1. Score now is at 7001 and keep going higher lol. https://www.reddit.com/r/worldnews/

Same score here: https://www.reddit.com/api/info.json?callback=jQuery2140596095916138063_1439882724004&limit=1&url=http://www.livemint.com/Money/MML9OZRwaACyEhLzUNImnO/The-richest-1-of-Indians-now-own-584-of-wealth.html

AyumuKasuga commented 8 years ago

Yes this is reddit score, but this project shows number of shares for specific link -- how many times this link is mentioned in reddit (for this example it would be 3). It's very strange and not clear to show number of shares for Google+ (and other sources) and score for reddit.

onigetoc commented 8 years ago

Score is people vote yeah, but i find it interesting to add, it's up to you