Narwhal Parade Maestro

    @curiousmedia/social-share

    1.0.7 • Public • Published

    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.

    Keywords

    none

    Install

    npm i @curiousmedia/social-share

    DownloadsWeekly Downloads

    1

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    114 kB

    Total Files

    8

    Last publish

    Collaborators

    • ishoa
    • cm-gregory
    • kyfoote
    • curiousjason
    • eaglstun