Socialshare - Forum

Forum Navigation
You need to log in to create posts and topics.

Socialshare

Whatsapp social sharing is not working properly ... can you help me

Hi @asmat,
Can you be more descriptive about the problem?
Whatsapp social sharing will only work from mobile devices.

asmat has reacted to this post.
asmat

There is whatsapp for WINDOWS. Works in conjunction with the phone.

asmat has reacted to this post.
asmat

I know it's work only for mobile device , but when i published the app as android platform and  after installing in mobile when I click the share button nothings happen....

The buttton's code is this: slWhatsAppShare [check] "[textMessage]"

here [textMessage] is TextInput ...

asmat has reacted to this post.
asmat

What value is stored into [check] variable after pressing the button?

This is the corresponding JavaScript code for the slWhatsAppShare command:

function slWhatsAppShare(message){
  if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
      var whats_app_message = encodeURIComponent(message);
      var whatsapp_url = "whatsapp://send?text="+whats_app_message;
      window.location.href= whatsapp_url;
      return "true";
  }else{
      return "false";
  }
}

 

 

I know the value of [check] variable doesn't belong to me, it belongs to app, if the app use into a mobile device that time the [check] variable is True..else false...

how can I use this code instead of that?

function slWhatsAppShare(message){
  if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
      var whats_app_message = encodeURIComponent(message);
      var whatsapp_url = "whatsapp://send?text="+whats_app_message;
      window.location.href= whatsapp_url;
      return "true";
  }else{
      return "false";
  }
}

 

It is the same code!
VisualNEO Web commands internally call JavaScript code.
This is the code for slWhatsAppShare action command.
You can try avoiding mobile detection using this:

BeginJS
whats_app_message = encodeURIComponent("My message");
whatsapp_url = "whatsapp://send?text="+whats_app_message;
window.location.href= whatsapp_url;
EndJS

 

Open chat
1
Do you need more info?
Hi, do you have any doubt?