From 41ef0f3342e1156c4b96544d5bdae78cdecce94b Mon Sep 17 00:00:00 2001 From: devlink-sumanta Date: Tue, 12 Nov 2024 11:58:51 +0530 Subject: [PATCH 1/2] Reddit Share button Update the submit URL --- src/RedditShareButton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RedditShareButton.ts b/src/RedditShareButton.ts index 7d392b8f..a23af744 100644 --- a/src/RedditShareButton.ts +++ b/src/RedditShareButton.ts @@ -6,7 +6,7 @@ function redditLink(url: string, { title }: { title?: string }) { assert(url, 'reddit.url'); return ( - 'https://www.reddit.com/submit' + + 'https://www.reddit.com/web/submit' + objectToGetParams({ url, title, From e4c1704baa3d51b7adc78c217837508dca8f6e7b Mon Sep 17 00:00:00 2001 From: devlink-sumanta Date: Tue, 12 Nov 2024 12:07:17 +0530 Subject: [PATCH 2/2] update the changelog --- .changeset/dirty-ladybugs-study.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dirty-ladybugs-study.md diff --git a/.changeset/dirty-ladybugs-study.md b/.changeset/dirty-ladybugs-study.md new file mode 100644 index 00000000..8ee0c4e5 --- /dev/null +++ b/.changeset/dirty-ladybugs-study.md @@ -0,0 +1,5 @@ +--- +"react-share": patch +--- + +This patch fixes an issue with the Reddit sharing functionality, where the shared link was not automatically populated in Reddit’s share preview. By appending /web before /submit in the Reddit share URL, the link now populates correctly, improving the user experience for Reddit sharing.