Thread: Bluesky Embeds
View Single Post
Old 11-15-2024, 05:57 PM   #3
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

I typed all that out and then I was looking at the HTML the oEmbed returns...

Code:
<blockquote class="bluesky-embed" data-bluesky-uri="at://did:plc:7odhgjrqjyqrjqvzxxmqzlz6/app.bsky.feed.post/3layjfivwxs2n" data-bluesky-cid="bafyreiakoqpncjodpxgsqhm6oardao3ybziagsvuppo2jcqybkgn7haxsa"><p lang="en">I suspect partisan split on trust in science is a matter of positive feedback. One side doesn\u0026#39;t like what science is saying (climate, vaccines), so they attack it. Scientists argue back. Partisans react defensively, giving their side more reason to attack science. Repeat.\nwww.vox.com/future-perfe...</p>\u0026mdash; <a href="https://bsky.app/profile/did:plc:7odhgjrqjyqrjqvzxxmqzlz6?ref_src=embed">Sean Carroll (@seanmcarroll.bsky.social)</a> <a href="https://bsky.app/profile/did:plc:7odhgjrqjyqrjqvzxxmqzlz6/post/3layjfivwxs2n?ref_src=embed">2024-11-15T13:49:45.092Z</a></blockquote><script async src="https://embed.bsky.app/static/embed.js" charset="utf-8"></script>
It appears that it kind of does work the same way as Twitter.. there's a blockquote of a given class and then a reference to some Javascript which appears to replace the blockquote with the desired HTML of the actual post. The portion of the post with the preview of the text is just that; preview text. Not necessary.

So in theory I could make a BBCode that includes the blockquote and include the Javascript on every page like I do with Twitter.

The only problem I see is these values in the blockquote:

Code:
data-bluesky-uri="at://did:plc:7odhgjrqjyqrjqvzxxmqzlz6/app.bsky.feed.post/3layjfivwxs2n" 
data-bluesky-cid="bafyreiakoqpncjodpxgsqhm6oardao3ybziagsvuppo2jcqybkgn7haxsa"
In the first one data-bluesky-uri the value 3layjfivwxs2n is the unique identifier of the post, but
Code:
did:plc:7odhgjrqjyqrjqvzxxmqzlz6
is some unique identifier of the user's profile, which is information the person posting the Bluesky link would not have.

The second one data-bluesky-cid is worse, I don't know what it is, all I know is if I request a different post I get a different number.

So I don't really see a way around that; every blockquote will probably need those magic numbers in place to properly find and display the post in question.

Which still makes option 2 and 3 the only things I can think of.

Maybe web savvy devs have a different idea?
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
The Following 2 Users Say Thank You to photon For This Useful Post: