Add social sharing buttons to a blog post or news article in under 5 minutes with one div and two file includes
Let visitors share your page to WeChat with a QR code popup without integrating a third-party widget
Control exactly which platforms appear on your sharing bar by passing a config list
Let users share pages to Chinese social platforms like Weibo, QQ Space, and Douban alongside Western ones
Project has not been actively maintained, for highly custom needs the author recommends implementing share URLs directly.
Share.js is a JavaScript library that adds social sharing buttons to web pages. You drop a single HTML element onto your page, include one CSS file and one JavaScript file, and the library automatically generates clickable icons that let visitors share the current page to platforms like Weibo, WeChat, QQ Space, QQ Friends, Tencent Weibo, Douban, Facebook, Twitter, LinkedIn, and Google+. The setup is minimal. You add a div with the class social-share, link the bundled stylesheet and script, and the buttons appear without any further initialization. If you want to control which platforms show up, you pass a configuration object listing the ones to enable or disable. You can also override the shared URL, title, description, and image rather than letting the library read them from the page automatically. Configuration can be done two ways: through a JavaScript object passed to the socialShare function, or through data attributes on the HTML element itself. For WeChat specifically, the library shows a QR code popup because WeChat does not support a standard share URL scheme, and you can customize the text shown in that popup. The library works with or without jQuery and supports loading via RequireJS for projects that use module bundlers. You can also disable the auto-generated icons entirely and supply your own anchor elements, which the library then wires up with the correct share links. The README includes a note that the project has not been actively maintained for some time, and that sharing fundamentally works by building a URL with content parameters for each platform. For highly custom requirements, the author suggests implementing the links directly. The license is MIT.
← overtrue on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.