I'm trying to embed posts from Mastodon and Threads on my #WordPress site and...
-
@docpop If you are "embedding" a post by using any tags other than blockquote and img, you are doing it wrong.
-
@jwz I’m using the embed code that Mastodon provides and putting that code into the customer html block in WP. Unfortunately, codes from some Mastodon servers don’t appear the same as the codes that Mastodon.social supplies.
-
@docpop My point is, those "embed codes" are a fundamental evil that should be stricken from the consciousness of the web. They only came into existence in the first place for surveillance tracking, and should be left to die, not copied.
If you want to quote what someone said, you use blockquote and paste the text. You link back to it with an a href. If they posted an image or a video, you use the img or video tags.
If you are a nice person, you mirror the media instead of just hotlinking it.
-
@docpop
STOP DOING EMBEDSThings dreamed up by the UTTERLY DERANGED:
<iframe src="...site that is not yours...">
<script src="https://mastodon.social/embed.js">"Hello I would like to mine bitcoin for you"
"Thank you for the tracking cookies and single point of failure"
THEY HAVE PLAYED US FOR ABSOLUTE FOOLS
-
DJM (freelance for hire)replied to Doctor Popular last edited by
@docpop Have no idea for Threads. But been testing the Mastodon embeds for quite some time, and using @stefan 's plugin for rendering https://wordpress.org/plugins/fediverse-embeds/
Example: https://www.didiermary.fr/most-favorited-mastodon-posts/Indeed, if the .js is not included, the embedding doesn't work properly/at all.
Seems some/many instances don't (want to) support it.My instance works well (so far), so I only embed my own posts when needed.
-
-
Stefan Bohacekreplied to DJM (freelance for hire) last edited by
@cybeardjm @docpop A small correction: it's the missing "mastodon-embed" class causing issues.
mastodon-embed class missing on some embeds · Issue #20 · stefanbohacek/fediverse-embeds-wordpress-plugin
Example post: https://mastodon.social/@Mastodon/110640658973976934 When embedding from mastodon.social, embed code looks like this:
Yup. Here's the little code I wrote. You might want to run it note for note.
Tweet2Embed/mastodon2html.py at main · edent/Tweet2Embed
Convert a public Tweet into embedded semantic HTML - Tweet2Embed/mastodon2html.py at main · edent/Tweet2Embed
GitHub (github.com)
Turns any public Mastodon status into semantic HTML & CSS for embedding.
Happy to answer any questions.
@cybeardjm @docpop Actually, an older version of the plugin did also check for the presence of an "embed.js" script, but that conflicted with embedded WordPress posts.
@cybeardjm Okay, another correction, I got things a bit mixed up. The plugin is still checking for either the presence of the mastodon-embed class (which, as per the GitHub issue, is sometimes missing), or the "embed.js" script, that one is not causing issues with detecting WordPress embeds.
Hey @docpop, I added a temporary workaround for the Mastodon embed detection. Let me know once you update to version 1.4.5 of the plugin.