I just wanted to know is it possible to add whatsapp share button on desktop site and share data using whatsapp web. For mobile plugins are available but for desktop I can't find anything. Can anyone suggest something.
I tried some code in which the link is opening but how to append data to it.
this is the javascript
<script type="text/javascript">
$(document).ready(function() {
$('.whatsapp').on("click", function(e) {
if(/Android|webOS|iPhone|iPad|iPod|Chrome|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
var article = $(this).attr("data-text");
var weburl = $(this).attr("data-link");
var whats_app_message = encodeURIComponent(article)+" - "+encodeURIComponent(weburl);
var whatsapp_url = "https://web.whatsapp.com://send?text="+whats_app_message;
window.location.href= whatsapp_url;
}else{
alert('you are not using mobile device.');
}
});
});
</script>
here is the html code
<div class='web'>
<h2><a href='http://www.stepblogging.com/google-cloud-messaging-push-notification-in-android-using-php-mysql/' target='_blank'>Google Cloud Messaging / PUSH Notification in Android using PHP, MYSQL</a></h2>
<p>Google Cloud Messaging for Android (GCM) is a free service that helps us to send data from your server to their Andriod application on Andriod devices.</p>
<a data-text="Google Cloud Messaging / PUSH Notification in Android using PHP, MYSQL" data-link="http://www.stepblogging.com/google-cloud-messaging-push-notification-in-android-using-php-mysql/" class="whatsapp">Share</a>
<h2><a href='http://www.stepblogging.com/php-login-script-using-pdo/' target='_blank'>PHP Login Script using PDO</a></h2>
<p>Are you looking for basic PHP login script. In this tutorial I want to discuss how to create a login page using PHP/MySQL with PDO Query , welcome and logout page. If you are a PHP beginner take a quick look at this live demo with Username : demo Password :demo. </p>
<a data-text="PHP Login Script using PDO" data-link="http://www.stepblogging.com/php-login-script-using-pdo/" class="whatsapp">Share</a>
</div>
yes, this is possible, but you need to :
Specify the text or/and link For opening contact list, on zap, just set the content as text . whatsapp://send?text=http://www.yoursite.com
Specify the zapzap telenumber for sending directly to contact . whatsapp://send?phone=5531991886910&text=http://www.yoursite.com
You can also use the zapzap oficial page. This takes 2 steps : https://api.whatsapp.com/send?phone=5531991886910&text=Hello
Remember that, all content on text variable must be a encoded string, and also that phone number have no spaces, or characters, also country code have not +
This is a nice feature, works very well. You can use (3) option and create a "goo.gl" url, and for options (1) and (2) you can trigger on a website, or app .
Actually, i'm trying to find some way to make whatsapp:// open in whatsapp desktop instead of asking for choose app from microsoft appstore, because now, its not opening it anymore, i dont know why, this used to work .
By the way, if you are a spammer .. don't even try anything, or we will catch you and all your fake numbers or profiles .
This is not for spamming. You have to use broadcast lists .
You can send the phone number so i can check if its correct, or, if you like, i can show you how this can be used, in our classifieds, included one buton for contact each seller, so users have an omnichannel experience .
Contacting advertisers from our site very fast, instead of saving, refreshing and contacting, can click and open zapzap chat .
If you have a website a customer service phone line, and a zapzap number, you are already a multi-channel business, so this is for seamless cross channel, so users can change from site to zapzap .
Remember that, best soluction for this issue is to use the API Page (3), and that you need to specify text variable all times, because IF you are going to send, you need to send something, and also, there is a "=" character after the phone number variable (at your example) that must be removed .
Do you know that feedbacks are very important for online discussion social forums, right ? Fell free to ask anything .
Remember also that this is 2017-2018, and the zap implementation had started some months ago. Please whatsapp, let us opening whatsapp:// protocol from chrome to whatsapp desktop, it was working so nice .. please, it save us so much time, to start a conversation with a number not on contact list, and its working on mobile, just on desktop, that was nice, but since December update, its not running,.. whatsapp pleeeeeeeeeaseeeeee .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With