Last active
February 25, 2021 07:00
-
-
Save bolub/695a8ff30533ddf99c81ddd52708d3b3 to your computer and use it in GitHub Desktop.
Social share
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// variables | |
const dummyDescription = "check this out"; | |
const dummyUrl = "http://google.com" | |
const dummyPhoneNumber = "23400112233" | |
const facebookLink = `https://www.facebook.com/sharer/sharer.php?u=${dummyDescription}` | |
const twitterLink = `http://twitter.com/share?text=${dummyDescription}&url=${dummyUrl}` | |
const whatsappLink = `https://api.whatsapp.com/send?phone=${dummyPhoneNumber}&text=${dummyDescription}` | |
// telegram | |
const telegramLink = `https://t.me/share/url?url=${dummyUrl}&text=${dummyDescription}` | |
const Test = ()=>{ | |
return( | |
<div> | |
<a href={whatsappLink}> | |
Click to go to whatsapp | |
</a> | |
<a href={twitterLink}> | |
Click to go to twitter | |
</a> | |
<a href={facebookLink}> | |
Click to go to facebook | |
</a> | |
<a href={telegramLink}> | |
Click to go to telegram | |
</a> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment