sharejs
Utility library for sharing.
Usage
- If you're using an SDK channel (see type) like Facebook Send; configure the SDK first.
- Use
createCallback
to get a function you can attach to any DOM event listener. Or use theshare
function directly if you want to do custom event handling.
Note: Social SDK's are loaded asynchronously on demand (when you call configure()
), so beware of popup blockers. A ready
method is provided that returns a promise which will be resolved when the SDK is ready to be used. (configure
returns the same promise.)
Example
See example/app.js
. You can run the example with npm start
and opening your browser at http://localhost:8080/webpack-dev-server/bundle. HOST
and PORT
can be customized through ENVIRONMENT variables.
Resources
More share links! More features! More fun!