Giter VIP home page Giter VIP logo

social-share-kit's Introduction

CDNJS npm

Social Share Kit is a library of decent and good looking CSS/JavaScript social sharing icons, buttons and popups.

To get started and see examples, check out http://socialsharekit.com!

Table of contents

License

Documentation

Browser support

IE8+, Chrome, Firefox, Safari. JavaScript library is standalone and has no 3rd party requirements.

Contributing

  • Do not edit CSS file directly since they are automatically generated from LESS files with LESSC compiler. Pull requests should contain changes to both .less and .css files.

  • If contributed changes affects documentation/examples page docs/index.html, you should add according changes to it too.

  • If you are changing JavaScript dist/js/social-share-kit.js compression of the file into dist/js/social-share-kit.min.js is welcomed (with npm uglify-js - uglifyjs --compress --mangle --comments -- dist/js/social-share-kit.js > dist/js/social-share-kit.min.js), but not neccessary.

social-share-kit's People

Contributors

alexandernst avatar arfilon avatar arnaudgaudin avatar darklow avatar kennynaoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

social-share-kit's Issues

Twitter cards

Firstly thanks for the fabulous script.
I have a slight issue.
Even though I have 'twitter card meta tags', for some reason the page title and meta descripton is is being used. Is that the default behaviour? How can I overcome this and use the twitter card tags?

Facebook share count always 0

The share count for Facebook is returning 0 for all requests.

Kaspars Sprogis informed me this is due to a change Facebook have made to their APi recently.

Example URL using socialsharekit (returning 0):
http://socialsharekit.com/

FB Graph query URL:
https://graph.facebook.com/?id=http%3A%2F%2Fsocialsharekit.com%2F

Sample JSON response for the query as of today:

{
   "og_object": {
      "id": "621585654608336",
      "description": "Library of decent and good looking social sharing icons, buttons and popups",
      "title": "Social Share Kit - Social sharing buttons, icons and popups",
      "type": "website",
      "updated_time": "2016-08-15T16:43:50+0000"
   },
   "share": {
      "comment_count": 0,
      "share_count": 189
   },
   "id": "http://socialsharekit.com/"
}

Better module system compatibility

Would be nice to add a better module system compatibility.

What I mean is that I kinda hate libraries adding themselves on the window object.
All I need is the possibility to require or import the module .

It also shouldn't need to parse my html during an init, but I should be able to call myself shareOnTwitter when an action is done on an DOM of my choice.

This would make the library compatible with framework like React.

Tumblr window

I'm finding that if the image is quite large (750px) then the tumblr window is very big and i'm unable to reqize it. How can I fix this?

Multiple Groups on Single Page

Curious if we can have multiple groups on a single page with different text/titles.

I tried this with different selectors:

SocialShareKit.init({
    selector: '.first .ssk',
    ...
});

and

SocialShareKit.init({
    selector: '.second .ssk',
    ...
});

The first wouldn't work and the second(last) one would work.

facebook returns broken json when using callback

I have found in my google webmasters tools that each post which has facebook share button with counter is blocked. The blocked url in GoogleWebTools is in this format:

http://graph.facebook.com/?id=https://github.com/darklow/social-share-kit&callback=cb_facebook_3590

So its fb graph url, then the id is website and then there is callback. The response is not blocked, but is broken json due to callback variable:

/**/ cb_facebook_3590({"id":"https:\/\/github.com\/darklow\/social-share-kit"});

Seems that facebook doesn't like callback variable name because when I change it to cb it automagically works:

http://graph.facebook.com/?id=https://github.com/darklow/social-share-kit&cb=cb_facebook_3590

Share by email is not encoding Title component

line 167 of social-share-kit.js is not encoding url component, this is creating a bad link which cannot be clicked.

            url = 'mailto:?subject=' + title +

should be

            url = 'mailto:?subject=' + encodeURIComponent(title) +

Icons do not Display Properly in Internet Explorer after last Patch from May 10, 2016

After the update to Internet Explorer Release May 10, 2016 the icons no longer show any pictures, only letters where you would expect pictures. All other browsers including Microsoft Edge works properly.

The affected version of IE is: 11.306.10586.0

We have confirmed that prior versions to IE does not suffer from this problem. I have attached a screenshot for reference.

2016-05-17_15-26-54

ODesk icon

Hi! Can you add ODesk icon in the set!

Sharing by Email Idea

Would be good to have the "share page via email feature" to work like it does for AddThis.

Given that a user presses share via email
Then a popup opens
And user should add email and message

Given that the user confirms sending
Then the email sender is the application owner
And the email is sent using the application owner's mail provider (or own server).

For application owners whom do not have mail providers you should probably keep current behavior default and make new behavior optional.

Buttons don't work with spans inside.

Assuming I have a button:

<a href class="ssk ssk-facebook"><span class="icon-facebook"></span>Share on Facebook</a>

Clicking on the span won't work, just a heads up. Cheers!

VK count: Uncaught TypeError: undefined is not a function

Hi, I got error "Uncaught TypeError: undefined is not a function " in console when using ssk-vk with div ssk-count. Console points to code on screen. When I remove vk social button it works, but I really need it.

Thank u in advance!

screenshot from 2015-08-01 02 09 23

Sticky bar with numbers CSS issue

Great script!
I notice that in sticky bar the div class="ssk-num" is not enough large to accomodate 2 or more share numbers; please see screenshot.
Thank you.

share

Officially maintained on npm?

Hello @darklow ,
I am the member of cdnjs project.
We want to host this library.
There is a question want to ask.
Is this library officially maintained on npm?
Because I saw the latest release version on github is v1.0.9, and the latest release version on npm is v1.0.8
Please help confirm that.
Thanks for your help!

cdnjs/cdnjs#8505

Re-initialise SocialShareKit?

I have an Ajax page with "previous" and "next" buttons. To add the SocialShareKit button to the bottom of each page, I'm calling init() after the ajax query, with the newly retrieved data.
Trouble is, it ends up attaching one SocialShareKit popup for every page that gets scrolled through (that is, every time init() gets called again), so by the time the user clicks the share button, 10 share windows might pop up, one under the other.
Is there a way to destroy/detach/unlink the existing SocialShareKit object whenever the data is replaced? Is there a way to re-initialise the data in JS without calling init() again? Init() is the only method I can find . . .
What's the trick?

thanks

John

y.appendChild is not a function

I caught this error:
Error: TypeError: y.appendChild is not a function
Source File: path-to-file/js/social-share-kit.min.js
Line: 8

any Idea why am I seeing this?

Bower

This project should have a Bower package.
Downloading and placing files manually is a thing of the past.

Make twitter text prepending of 'title' optional

I am not sure if this was raised before, and I apologize in advance if I'm missing some option I couldn't spot in the code or documentation (do let me know, it'd help a lot!)

I want my twitter share message to not include the site's title, but only my own custom text. The problem is that the code always prepends the site's title to whatever text is set up in the options.

(line 208)
url = 'https://twitter.com/intent/tweet?url=' + paramsObj.shareUrlEncoded() + '&text=' + encodeURIComponent(title + (text && title ? ' - ' : '') + text);
After reading the code, I realize that if I set up { title = '' } in the options, it will not add it to the message. However, that doesn't work with other sharing services like linkedin, tumblr and email, that all use the title specifically separate from the summary or body text (understandably)

So while setting title to an empty string works, it isn't ideal.

I think it might be useful to make the twitter message either not append the title to begin with (supplying a twitter text message is usually enough to most cases) or make this prepending of the title optional.

buttons do not share upon click.

Hi there, it looks like I have an issue: the share buttons generate without trouble, but do not share upon click.

http://www.list.plus/app/#/shared/82/212

is the test url.

<div class="sharing-list ssk-group ssk-xs ssk-count ssk-grayscale" data-url="http://list.plus/app/#/shared/{{list[0].list_owner}}/{{list[0].id}}" data-text="{{list[0].name}}">
  <a href="" class="ssk ssk-facebook"></a>
  <a href="" class="ssk ssk-twitter"></a>
  <a href="" class="ssk ssk-google-plus"></a>
  <a href="" class="ssk ssk-pinterest"></a>
  <a href="" class="ssk ssk-linkedin"></a>
</div>

is the html (in angular)

and

SocialShareKit.init({selector: '.sharing-list'});//sharekit

is the call in the controller. It's worth noting that usually there are multiple instances on page, but this is a test case showing it not working on an single instance page.

Add XING network

Hi. Is it possible to at XING as a new network to share links to via popup? This one is quite famous in Europe (especially in Germany), compared to LinkedIn. I was looking into adding it via pull request but struggled to understand how you create the glyphs and fonts. According to the docs it looks quite similar to how FB and Twitter work.

https://dev.xing.com/plugins/share_button/docs

Regards,
Stephan

Shopify?

Any idea why the popups wouldn't be working in a shopify theme? The js seems to load just fine. But no even fires and it just reloads the page instead of making the popup happen.

Whatapp support?

I noticed you have a whatsapp glyth/icon. How to support the whatsapp passthru?

whatsapp://send?text=

Share url & count is nothing

Hi,

I just can across this and want to get rid of "Easy Social Shares" bloatware plugin, however I get nothing when I click share. I'm using wordpress & bootstrap theme, here is the code I'm using:

<div class="ssk-group ssk-lg ssk-count"> <a href="" class="ssk ssk-pinterest"></a> <a href="" class="ssk ssk-facebook"></a> <a href="" class="ssk ssk-twitter"></a> <a href="" class="ssk ssk-google-plus"></a> <a href="" class="ssk ssk-email"></a> </div>

What do I need to do to get the right share url and count working?

p.s. are you gonna use http://newsharecounts.com for twitter counts now that twitter has taken away the api?
Thanks,

Reddit

Can someone demonstrate a reddit share button using this sdk ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.