Implemented Whatsapp button for desktop version of xF2...

Neutral Singh

Well-known member
Why the desktop version of xF2 does not show the whatsapp button like in the mobile version? Communities would find it useful to share the content directly via whatsapp desktop client...
 
Last edited:
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
There's no middle ground here.

Either we use a direct whatsapp:// link which will only work if you have an installed app, or we use the current approach which opens another window but it then works on all devices regardless of having an app installed.

The latter probably makes the most sense, otherwise we're displaying an icon that doesn't actually do anything for the majority of users.

Technically it would be down to WhatsApp to add something which auto closes the "Send" window after the app has been launched with the current approach.
 
I have seen many plugins in WordPress where the popup does not show-up when clicking the Whatsapp button...

Like here: http://tampagurdwara.com/

In desktop browsers Safari, Chrome and FireFox, it works as desired with no popup window.

Are they using a different API...
 
Last edited:
They are using the direct whatsapp:// link which doesn't work unless you have an app installed.

It might be possible to solve this by having the link resolve to something internal (xenforo.com/community/share/whatsapp/?whatever) and use some javascript magic to check if the whatsapp:// url is able to open (which is apparently possible with this: https://stackoverflow.com/questions/27321472/share-via-whatsapp-only-if-it-is-installed) and if it doesn't open the popup link?
 
It might be possible to solve this by having the link resolve to something internal (xenforo.com/community/share/whatsapp/?whatever) and use some javascript magic to check if the whatsapp:// url is able to open (which is apparently possible with this: https://stackoverflow.com/questions/27321472/share-via-whatsapp-only-if-it-is-installed) and if it doesn't open the popup link?
That might work, though generally our share code is designed to be pretty simple without any special cases within it. We'll have a look.
 
It's working fine for me on my macOS with Firefox.

I'm not sure what factors would prevent it from working on an individual basis.
 
Top Bottom