tabalinas / jssocials

Social Network Sharing jQuery Plugin
http://js-socials.com
MIT License
464 stars 104 forks source link

WhatsApp link generation broken? #63

Closed RambosRide closed 8 years ago

RambosRide commented 8 years ago

First off - love the plugin - this is the first issue I've run across on the newer version.

I've tried the Whatsapp link from a webpage on a desktop in chrome, or on my ipad in safari - neither link works.

In safari I get a popup "Safari cannot open the page because the address is invalid".

If I try the whatsapp link from http://js-socials.com/ - in firefox it errors "The address wasn't understood" and this is in the addressbar whatsapp://send?text=http%3A%2F%2Fjs-socials.com%2F%20Simple%20Social%20Network%20Sharing%20Plugin

Any ideas for a quick patch? Will this even work from a desktop browser?

Thanks!

tabalinas commented 8 years ago

Thank you for the feedback and the report. You are right, whatsapp sharing works only on mobile. So it makes sense to show it only for mobile. You could use some device definition code and condition not to add for non-mobile devices (e.g. checkout this one http://stackoverflow.com/questions/7928200/using-modernizr-to-test-for-tablet-and-mobile-opinions-wanted). This indeed should be fixed for the project site (not sure it's a good idea to put this in the plugin's code).