Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshgillies/social-widgets
Likes, shares and things like that.
https://github.com/joshgillies/social-widgets
Last synced: 5 days ago
JSON representation
Likes, shares and things like that.
- Host: GitHub
- URL: https://github.com/joshgillies/social-widgets
- Owner: joshgillies
- Created: 2013-11-10T06:25:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-01T13:05:57.000Z (over 11 years ago)
- Last Synced: 2024-10-19T00:15:14.816Z (27 days ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social widgets
Likes, shares and things like that.
## Table Of Contents
* [share](#share)
* [count-shares](#count-shares) (JSON with number of shares)Example: https://facebook.com/sharer/sharer.php?u=http://google.com
Network
URL
Documentation
https://facebook.com/sharer/sharer.php?u={{LINK}}
http://twitter.com/share?url={{LINK}}
https://twitter.com/intent/tweet?url={{LINK}}
Google Plus
https://plus.google.com/share?url={{LINK}}
link
Linked In
http://www.linkedin.com/shareArticle?url={{LINK}}
link
VK
http://vkontakte.ru/share.php?url={{LINK}}
link
Odnoklassniki
http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl={{LINK}}
Yandex
http://share.yandex.ru/go.xml?service=yaru&url={{LINK}}&title={{TITLE}}&body={{TEXT}}
Livejournal
http://www.livejournal.com/update.bml?subject={{TITLE}}&event={{TEXT}}&prop_taglist={{TAGS}}&href={{LINK}}
Returns JSON with a number of shares for a page.
```
{
"facebook": 5461703,
"twitter": 11876867,
"vk": 2462,
"odnoklassniki": 547,
"linkedin": 18113
}
```### JavaScript (node.js)
`npm install count-shares`
### PHP
#### API
Example: `/shares/php/main.php?url=http://www.google.com&networks=facebook,twitter`
##### url (required)
`www.domain.com` and `domain.com` are different websites for Twitter and Odnoklassniki.
##### networks
Comma separated. `facebook`, `twitter`, `linkedin`, `vk` or `odnoklassniki`.
Default: Facebook and Twitter.