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

Reddit Share button Update the submit URL #547

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dirty-ladybugs-study.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/RedditShareButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down