@toptal/social-urls
v1.0.1
Published
Do you need to share a page on Facebook? Use this social URLs builder! Supports different social networks
Downloads
5
Readme
Social URLs Builder
Do you need to share a page on Facebook or other social network? Are you tired to manually construct URLs like http://www.facebook.com/sharer.php?u=toptal.com
over and over again for each new project? 😫
This 📦 is for you!
$ npm install @toptal/social-urls
Show me the code!
const { getShareUrl, NETWORKS } = require('@toptal/social-urls');
// https://www.facebook.com/sharer.php?u=https%3A%2F%2Ftoptal.com%2Fmergewords&t=Merge%20words%2C%20fast%20and%20easy.
const facebookUrl = getShareUrl(NETWORKS.FACEBOOK, {
url: 'https://toptal.com/mergewords',
title: 'Merge words, fast and easy.'
});
Supported Social Networks
enum NETWORKS {
FACEBOOK,
LINKEDIN,
TWITTER,
POCKET
}