Basic usage
Works with any HTML tags: <a>
, <div>
, <button>
or other. Choose any and add required attributes data-social
.
Full list of supported social providers and mobile messengers.
1 2 3 4 5 6 7 8 9 10 11 | <!-- Create button with share to Twitter --> <button data-social="twitter">Share this to Twitter</button> <!-- Create link with share to Facebook --> <a href="#" data-social="facebook">Share this to Facebook</a> <!-- Create div container with share to LinkedIn --> <div data-social="linkedin">Share this to LinkedIn</div> <!-- Create icon from Fontello.com with share to Tumblr --> <i class="icon-tumblr" data-social="tumblr"></i> |
By default, goodshare.js
search this tags for get title, description and image (for some social networks):
1 2 3 4 5 6 | <head> <title>Current page title</title> <meta name="description" content="Current page description."> <link rel="apple-touch-icon" href="http://example.com/path/to/image.png"> ... </head> |