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

Add a sharing API #2396

Closed
aendra-rininsland opened this issue Jan 2, 2024 · 1 comment
Closed

Add a sharing API #2396

aendra-rininsland opened this issue Jan 2, 2024 · 1 comment
Labels
feature-request A request for a new feature x:duplicate This issue or pull request already exists

Comments

@aendra-rininsland
Copy link
Contributor

aendra-rininsland commented Jan 2, 2024

Is your feature request related to a problem? Please describe.

Currently users wanting to share off-site links directly from the page need to do a variety of URL copy/paste actions to get a link into the Bluesky editing interface. Further, offsite content creators who want to "pre-fill" the sharing post's text are unable to do so. This makes it impossible to create off-site sharing buttons, such as you'd have for every other social media.

Describe the solution you'd like

Two APIs:

  • /share?url=<url>&prefill=<prefill text>&origin=<handle of account linked to shared content>
    • User journey: When a user clicks a share button outside of Bluesky, she is taken to a new post dialog. If the optional prefill query parameter has a value, that text precedes the string given via the required url query parameter. If the optional origin query parameter has a value, a translated version of a string in the format ", via @{handle}." is appended to the text.
  • /repost?did=<did>&prefill=<prefill text>[&allow_quote]
    • User journey: A user clicks a link in this format on an off-site page, which opens the related DID in the Bluesky interface, possibly without any attached replies. If the originating website included the optional allow_quote query parameter, the "Repost"/"Quote post" menu is already unfurled, allowing the user to select either option. If "Quote post" is selected by the user, the quote post editor is opened; if the prefill query parameter is included, the editor is already populated with the text from that. If the "enable_quote" query parameter is omitted, the user is given the option to repost the linked DID without a quote. Of course if the user really wants to quote post a link, she's still able to copy/paste the URL into a new post.

Describe alternatives you've considered

Prior art:

  • X: /intent/tweet?url=<url>&text=<prefill>&via=<handle>
  • Facebook: /sharer.php?u=<url>&t=<prefill>
  • LinkedIn: /sharing/share-offsite/?url=<url>

Of these, X's implementation fulfils the needs of media orgs the best by allowing both prefill text as well as the ability for a shared post be linked to the org's canonical user.

Additional context

I'm a senior developer with Financial Times and need at least the first API I suggested to be able to add "Share on Bluesky" buttons, which I highly suspect we'll want to do this year.

Might be in some ways related to #66.

@aendra-rininsland aendra-rininsland added the feature-request A request for a new feature label Jan 2, 2024
@pfrazee
Copy link
Collaborator

pfrazee commented Jan 2, 2024

This is a duplicate of #1540, and I'm going to copy over your issue as a comment there if you don't mind.

@pfrazee pfrazee closed this as completed Jan 2, 2024
@pfrazee pfrazee added the x:duplicate This issue or pull request already exists label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature x:duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants