What about using rel="share-url" to expose sharing intents?

https://news.ycombinator.com/rss Hits: 15
Summary

Let's say that you've visited a website and want to share it with your friends. At the bottom of the article is a list of popular sharing destinations - Facebook, BlueSky, LinkedIn, Telegram, Reddit, HackerNews etc. You click the relevant icon and get taken to the site with the sharing details pre-filled. The problem is, every different site has a different intent for sharing links and text. For example: https://www.facebook.com/sharer.php?u=…&t=… https://www.linkedin.com/sharing/share-offsite/?url=… https://bsky.app/intent/compose?text=… https://www.threads.net/intent/post?url=…&text=… https://www.reddit.com/submit?url=…&title=… As you can see, some only allow a URL, some text and a URL, and some just a plain text which could contain the URl. A bit of a mess! It's probably impossible to get every site to agree on a standard for their sharing intent. But there could be a standard for exposing their existing sharing mechanism. That's the proposal from Ben Werdmuller with "Share Openly". ShareOpenly knows about most major social networks, as well as decentralized platforms like Mastodon, Bluesky, and Known. However, if ShareOpenly is having trouble sharing to your platform, and if your platform supports a share intent, you can add the following metatag to your page headers: <link rel="share-url" href="https://your-site/share/intent?text={text}"> Where https://your-site/share/intent?text= is the URL of your share intent. The special keyword {text} will be replaced with the URL and share text. I think that's a pretty nifty solution. For sites which take a URl and an (optional) title, the meta element looks like: HTML<link rel="share-url" href="https://www.facebook.com/sharer.php?u={url}&t={text}"> <link rel="share-url" href="https://lemmy.world/create_post?url={url}&title={text}"> For those which only take URl, it looks like: HTML<link rel="share-url" href="https://www.linkedin.com/sharing/share-offsite/?url={url}"> It's slightly trickier for sites like Mastodon and Blu...

First seen: 2025-08-22 13:12

Last seen: 2025-08-23 03:32