https://github.com/limit-zero/share-js
Javascript social sharing implementation supporting Bit.ly link shortening
https://github.com/limit-zero/share-js
Last synced: 7 days ago
JSON representation
Javascript social sharing implementation supporting Bit.ly link shortening
- Host: GitHub
- URL: https://github.com/limit-zero/share-js
- Owner: limit-zero
- License: mit
- Created: 2017-01-15T19:03:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T19:12:10.000Z (over 9 years ago)
- Last Synced: 2025-11-19T19:06:21.781Z (7 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# share-js
Javascript social sharing implementation supporting Bit.ly link shortening
## Usage
### Share.init
If you would like to enable Bit.ly link shortening, you can initizalize Share.js using this method.
```
Share.init({bitly_token: 'MY_BITLY_OAUTH_TOKEN'});
Share.show('facebook');
```
The resulting URL is now shortened!
### Share.show
The only required parameter to Share.show is the provider key. Currently supported providers are `facebook`, `twitter`, `linkedin`, `pinterest`, and `googleplus`.
Optionally, you can set the following parameters to override inferred values from OpenGraph tags present on the current page:
- `title` - The page title/name of the link that will be shared.
- `description`
- `image` - The image to be included in the preview
- `params` - Key-values to append to the URL (GA campaign, etc)
- `url` - Override the URL