Small (1.5 KB) simple tool for sharing url, title, description and image to VK, Facebook (Feed, Dialog, Button, Messenger), Twitter, Reddit, Pinterest, Tumblr, G+, VK, OK, Mail.ru, LinkedIn, Whatsapp, Viber, Telegram, Line.
TODO
npm install --save vanilla-sharing
<script src="https://unpkg.com/vanilla-sharing"></script>
import { fbButton } from 'vanilla-sharing';
fbButton({
url: 'https://alexey-avdeev.com/vanilla-sharing/',
});
VanillaSharing.fbButton({
url: 'https://alexey-avdeev.com/vanilla-sharing/',
});
Share on facebook.com via the Feed dialog
Documentation: https://developers.facebook.com/docs/sharing/reference/feed-dialog
fbFeed({
url: string,
redirectUri: string,
fbAppId: string,
})
Share on facebook.com via the Share dialog
Documentation: https://developers.facebook.com/docs/sharing/reference/share-dialog
fbShare({
url: string,
redirectUri: string,
hashtag: string,
fbAppId: string,
})
Share on facebook.com using facebook share button
fbButton({
url: string,
})
Share via Facebook Messenger
Share method from Sharing for Messenger.
messenger({
url: string,
fbAppId: string,
})
Share on Twitter
tw({
url: string,
title: string,
hashtags: array,
})
Share on Reddit
reddit({
url: string,
title: string,
})
pinterest({
url: string,
description: string,
media: image url string,
})
tumblr({
url: string,
title: string,
caption: string,
tags: array,
})
Share on Google+
gp({
url: string,
})
Share on vk.com
vk({
url: string,
title: string,
description: string,
image: string,
isVkParse: boolean,
})
Share on ok.ru
ok({
url: string,
title: string,
})
Share on Mail.ru
mail({
url: string,
title: string,
description: string,
image: string,
})
Share via user's email
email({
url: string,
title: string,
description: string
})
Share on LinkedIn
Share method from Share on LinkedIn.
linkedin({
url: string,
title: string,
description: string,
})
Share via Whatsapp
WhatsApp FAQ - Using Click to Chat.
whatsapp({
url: string,
title: string,
phone: string,
})
Share via Viber
viber({
url: string,
title: string,
})
Share via Telegram
telegram({
url: string,
title: string,
})
Share via Line
line({
url: string,
title: string,
})