Created
September 29, 2018 14:50
-
-
Save mandaputtra/076a618a1519407afc889d531bc136c8 to your computer and use it in GitHub Desktop.
Click to send whastapp
This file contains 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
// https://api.whatsapp.com/send?phone=+{{ *YOURNUMBER* }}&text=%20{{ *YOUR MESSAGE* }} | |
var yourNumber = "{{ your number in string}}" | |
var yourMessage = "{{ your message in string }}" | |
// %20 mean space in link | |
// If you already had an array then you just join them with '%20' | |
// easy right | |
function getLinkWhastapp(number, message) { | |
number = this.yourNumber | |
message = this.yourMessage.split(' ').join('%20') | |
return console.log('https://api.whatsapp.com/send?phone=' + number + '&text=%20' + message) | |
} | |
getLinkWhastapp() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment