- Use gulp
gulp.task("whatsappFix", function () {
gulp.src('./node_modules/whatsapp-api-fix/index.js')
.pipe(gulp.dest("dist/"));
});
- Use gulp
<script async src="./node_modules/whatsapp-api-fix/index.js"></script>
- Or any other...
- Use funcion only number
var $wppFix = new WhatsappFix();
var params = { number: 123456789 };
var redirect_whatsapp_link = $wppFix.getRedirect(params);
// > http://web.whatsapp.com/send?phone=123456789&text=
// > http://api.whatsapp.com/send?phone=123456789&text=
- Use funcion number and text
var $wppFix = new WhatsappFix();
var params = { number: 123456789, text: 'text' };
var redirect_whatsapp_link = $wppFix.getRedirect(params);
// > http://web.whatsapp.com/send?phone=123456789&text=text
// > http://api.whatsapp.com/send?phone=123456789&text=text
- Use funcion to search in
stackoverflow
in case of error
var $wppFix = new WhatsappFix();
var params = { number: 123456789, text: 'text', search: true };
var redirect_whatsapp_link = $wppFix.getRedirect(params);