This project is intended to help you integrate sharing on social media within web environment.
It provides a collection of social media share URLs and corresponding icons to easily implement share functionality across popular platforms.
Why install a full library when you only need to support two share services?
You don’t need a massive library just to add simple social sharing!
Keep it light skip the heavy libraries and just use simple share URLs.
| Platform | Share URL | Details | Icons |
|---|---|---|---|
| Threads | https://threads.net/intent/post | Link | Link |
| Twitter (X) | https://twitter.com/intent/tweet | Link | Link |
| https://www.reddit.com/submit | Link | Link | |
| https://www.facebook.com/sharer.php | Link | Link | |
| Facebook Messenger | https://www.facebook.com/dialog/send | Link | Link |
| Telegram | https://t.me/share | Link | Link |
| https://api.whatsapp.com/send | Link | Link | |
| Tumblr | http://tumblr.com/widgets/share | Link | Link |
| https://www.linkedin.com/feed | Link | Link | |
| VK (ВКонтакте) | https://vk.com/share.php | Link | Link |
| https://pinterest.com/pin/create/button/ | Link | Link | |
| Instapaper | http://www.instapaper.com/hello2 | Link | Link |
| mailto: | Link | Link | |
| ❌ | |||
| TikTok | ❌ | ||
| YouTube | ❌ |
const searchParams = new URLSearchParams({
url: "https://github.com/dango0812", // share url
text: "hello, world"
});
const shareUrl = `https://twitter.com/intent/tweet?${searchParams.toString()}`;
<a href={shareUrl} target="_blank" rel="noopener noreferrer">
twitter share!
</a>
const handleTwitterShare = () => {
const searchParams = new URLSearchParams({
url: "https://github.com/dango0812", // share url
text: "hello, world"
});
const shareUrl = `https://twitter.com/intent/tweet?${searchParams.toString()}`;
window.open(shareUrl, "_blank", "width=800,height=640,noopenner,noreferrer");
};
<button onClick={handleTwitterShare}>
twitter share!
</button>