@curiousmedia/social-share
v1.0.7
Published
Share URLs for popular social networks
Downloads
13
Keywords
Readme
Social Share
Utility for simple content sharing on popular social media networks. No social media accounts are required to use this library.
A Javascript version of the library is available.
Usage
Get URL for to share website.
//Google plus
SocialShare.google({
url: "http://www.curiousmedia.com"
});
//Pinterest
SocialShare.pinterest({
url: "http://www.curiousmedia.com",
copy: 'Check out Curious Media!',
image: "http://curiousmedia.com/assets/images/header/logo.png"
});
//Tumblr
SocialShare.tumblr({
url: "http://www.curiousmedia.com",
copy: 'Check out Curious Media!',
title: 'Curious Media'
});
Open URL in popup window.
//Facebook
SocialShare.popup(SocialShare.facebook({
url: 'http://curiousmedia.com'
}));
//Twitter
SocialShare.popup(SocialShare.twitter({
url: "http://curiousmedia.com.com",
copy: 'Check out Curious Media!',
tags: ['media', 'interactive']
}));
Supported networks
The library currently supports five social media networks. Each network accepts different data, however, the data format is normalized.
- Facebook.
- url*
- Twitter
- copy*
- url
- tags
- Pinterest.
- copy
- url
- image*
- Tumblr
- url*
- copy
- title
- Google Plus
- url*
*required
Other languages
A PHP version of social share is available.