8000 Update Whatsapp provider to use newer sharing URL that works on mobile devices and desktop browsers by philwolstenholme · Pull Request #366 · heiseonline/shariff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update Whatsapp provider to use newer sharing URL that works on mobile devices and desktop browsers #366

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

Closed

Conversation

philwolstenholme
Copy link

See https://faq.whatsapp.com/en/general/26000030/?category=5245251:

To create a link with just a pre-filled message, use https://wa.me/?text=urlencodedtext

Example:https://wa.me/?text=I'm%20inquiring%20about%20the%20apartment%20listing

Using the https://wa.me URL means that the sharing link will work on mobile devices and in a desktop web browser.

I think this would fix #352.

@@ -64,6 +64,6 @@ module.exports = function(shariff) {
'tr': 'Whatsapp\'ta paylaş',
'zh': '在Whatsapp上分享'
},
shareUrl: 'whatsapp://send?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()
shareUrl: 'https://wa.me/?text=' + encodeURIComponent(title) + '%20' + url + shariff.getReferrerTrack()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using instand https://api.whatsapp.com/send?text=A Text.
wa.me is a redirect to api.whatsapp.com, just for shorter urls. So if we use api.whatsapp.com the redirection to the app is faster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/bradvin/social-share-urls#whatsapp says the same. There are also a few further links to references and documentation. And there is a test note:

Test Notes : wa.me does not work unless a phone_number is supplied, so, for this reason, we are suggesting users use the api.whatsapp.com format.
Test Results : Functionality tested and verified by SocialShare Dev's in 2020.

@philwolstenholme If you are still available: Do you think we should do so? If so, could you change your PR? We should then ping the maintainers so they merge it. Otherwise, if you are not available anyore, let us know so someone else can make a PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi everyone, I agree we should use https://api.whatsapp.com — I think when I made this PR I didn't realise the longer URL was available. I won't have time to work on this now, so if someone else could pick it up that would be great 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NoNamePro0 Do you want to make a pull request? If not, I can do that. Just let me know here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I can do it 👍

@richard67
Copy link
Contributor

@philwolstenholme Could you close this pull request since @NoNamePro0 made a new one which replaces this one and uses the API URL? Thanks in advance.

@richard67
Copy link
Contributor

@compeak This one here could be closed because there is a newer PR #381 with an improved solution for the same issue.

@z1tr0t3c z1tr0t3c closed this Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WhatsApp doesn't open
4 participants
0