From 6a431370ebf36c9424350c155b80cfe74a6e6ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20Nyga=CC=8Ard?= Date: Sun, 19 Nov 2023 10:42:47 +0200 Subject: [PATCH] use twitter intent api to fix issue on Android https://github.com/nygardk/react-share/issues/484 --- .changeset/purple-wolves-smell.md | 5 +++++ src/TwitterShareButton.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/purple-wolves-smell.md diff --git a/.changeset/purple-wolves-smell.md b/.changeset/purple-wolves-smell.md new file mode 100644 index 00000000..a052acab --- /dev/null +++ b/.changeset/purple-wolves-smell.md @@ -0,0 +1,5 @@ +--- +"react-share": patch +--- + +Fixed WhatsApp sharring issue on Android described [here](https://github.com/nygardk/react-share/issues/484). diff --git a/src/TwitterShareButton.ts b/src/TwitterShareButton.ts index a004765c..c8374e42 100644 --- a/src/TwitterShareButton.ts +++ b/src/TwitterShareButton.ts @@ -16,7 +16,7 @@ function twitterLink( assert(Array.isArray(related), 'twitter.related is not an array'); return ( - 'https://twitter.com/share' + + 'https://twitter.com/intent/tweet' + objectToGetParams({ url, text: title,