The Social Share Code Libraries project provides source code libraries for writing code that uses sharing on social-media.
All code is released under the permissive BSD-3-Clause License, so you should be able to use it in any of your projects, even if they are not permissively licensed like the BSD-3-Clause License.
This is a sub-project of Social Share URL's, a project for documenting the sharing URL API's of third-party, social-media websites. Check out more about us here :
https://github.com/bradvin/social-share-urls
https://github.com/bradvin/social-share-urls/tree/master/code/
Online Demo
:
- EarthFluent.com : Social Share Media JavaScript Demo
- EarthFluent.com : Learn Japanese Online
- Peter Kropotkin : The Great French Revolution
- Remove Duplicate Lines : Removing Duplicate Entries from Lists
Code Sandbox
:
- JSBin.com : Social Share Media Javascript Demo
- IdeOne.com : Does Not Compile, Unknown Error.
- CodeSandbox.io : Does Not Compile, Unknown Error.
Sample Use
:
const socialmedia = GetSocialMediaSites_WithShareLinks_OrderedByPopularity();
const socialmediaurls = GetSocialMediaSiteLinks_WithShareLinks({
'url':$('#input_url').val(),
'title':$('#input_title').val(),
});
var children = [];
for(var i = 0; i < socialmedia.length; i++) {
const socialmedium = socialmedia[i];
children.push(
'<tr><td class="output-label">' +
socialmedium +
'</td><td>' +
socialmediaurls[socialmedium] +
'</td></tr>'
);
}
$('#output-table').empty();
$('#output-table').append(children.join());
Library Files
: