Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement WhatsApp Share #11

Closed
fmendoza opened this issue Jan 28, 2019 · 8 comments
Closed

Implement WhatsApp Share #11

fmendoza opened this issue Jan 28, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@fmendoza
Copy link
Contributor

Would be cool :)

@peterpeterparker
Copy link
Owner

Sounds possible, probably like the following https://github.com/720kb/angular-socialshare/blob/1bdd03a2ac96727427e243228c53f4a2778df35f/lib/angular-socialshare.js#L789

That would work only on mobile, then there is the question if it's the work of the web component to handle this or if it's the work of the consumer to provide the info only when mobile...

@peterpeterparker peterpeterparker added the enhancement New feature or request label Jan 28, 2019
@fmendoza
Copy link
Contributor Author

fmendoza commented Jan 28, 2019

I'm using ngx-sharebuttons for trynearme.app in desktop mode and I think they added a routine to check the platform:

https://github.com/MurhafSousli/ngx-sharebuttons/blob/master/projects/core/src/lib/buttons/whatsapp.ts

See attached image just for reference

captura de pantalla 2019-01-28 a la s 11 37 59

@peterpeterparker
Copy link
Owner

@peterpeterparker peterpeterparker self-assigned this Jan 28, 2019
@fmendoza
Copy link
Contributor Author

Sweet, let me know if you need help

@fmendoza fmendoza changed the title Implement What's App Share Implement WhatsApp Share Jan 28, 2019
peterpeterparker added a commit that referenced this issue Jan 28, 2019
@peterpeterparker
Copy link
Owner

peterpeterparker commented Jan 28, 2019

Actually it seems that nowadays it works find on computer (Mac) and Android devices too with https://api.whatsapp.com/send

Don't have an iPhone with WhatsApp installed, do you have that open @fmendoza ?

could you give a try to https://websocialshare.com ?

P.S.: Implemented but not released but deployed

peterpeterparker added a commit that referenced this issue Jan 28, 2019
@fmendoza
Copy link
Contributor Author

@peterpeterparker I can confirm that it works on Mac and Android, but I don't have an iPhone with whatsapp to test it out.

@peterpeterparker
Copy link
Owner

@fmendoza cool thx for the feedback. I'll test on iPhone today, if it works will then release ;)

peterpeterparker added a commit that referenced this issue Jan 29, 2019
@peterpeterparker
Copy link
Owner

@fmendoza it worked fine on iPhone but I discovered that it didn't worked in Safari

fortunately found that medium post https://medium.com/@jeanlivino/how-to-fix-whatsapp-api-in-desktop-browsers-fc661b513dc and I didn't know why I didn't went that way straight from the begin ;)

therefore I enhanced the component like the following:

if mobile -> https://api.whatsapp.com/send?text=Hello
else -> https://web.whatsapp.com/send?text=Hello

thx again for the idea, I gonna release the v4 of this component right now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants