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

Whatsapp redirection to 'api/web .whatsapp.com' controlled manually #635

Closed
lukaszsz99 opened this issue Mar 16, 2023 · 1 comment · Fixed by #643
Closed

Whatsapp redirection to 'api/web .whatsapp.com' controlled manually #635

lukaszsz99 opened this issue Mar 16, 2023 · 1 comment · Fixed by #643
Labels

Comments

@lukaszsz99
Copy link

I want to redirect from Whatsapp ngx-sharebutton to https://api.whatsapp.com/ from desktop browser (ngx-sharebuttons v11.0.0).

Current Behavior
When clicking Whatsapp sharebutton using ... it redirects to ... :
using desktop browser - it redirects to - https://web.whatsapp.com/
using mobile browser - it redirects to - https://api.whatsapp.com/

Expected Behavior
When clicking Whatsapp sharebutton using ... it redirects to ... :
using desktop browser - it redirects to - https://api.whatsapp.com/
using mobile browser - it redirects to - https://api.whatsapp.com/

Purpose
When redirected to https://api.whatsapp.com/ on desktop, the Whatsapp application (desktop version) will open automatically if it is installed.

Environment

  • Angular:
  • ngx-sharebuttons:
@MurhafSousli
Copy link
Owner

MurhafSousli commented Mar 16, 2023

Yes, you can override the props

Here is a working stackblitz https://stackblitz.com/edit/ngx-sharebuttons-zc2yo3?file=src%2Fapp%2Fapp.module.ts

ShareButtonsModule.withConfig({
  prop: {
    whatsapp: {
      share: {
        desktop: 'https://api.whatsapp.com/send?',
        android: 'whatsapp://send?',
        ios: 'https://api.whatsapp.com/send?'
      },
    }
  },
  debug: true,
}),

At the time I configured whatsapp the default links worked the best. maybe now https://api.whatsapp.com/send? works for all platforms, do let us know what worked out for you!

@MurhafSousli MurhafSousli linked a pull request May 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants