1.0.7 • Published 6 years ago

@curiousmedia/social-share v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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.

1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago