I'm trying to embed posts from Mastodon and Threads on my #WordPress site and...
-
I'm trying to embed posts from Mastodon and Threads on my #WordPress site and... wow... things are a mess.
Posts from Mastodon.social look great, but posts from other Mastodon servers aren't displaying properly.
Then the Threads posts break all the formatting and shows up wherever they want. All of the Thread embeds show the comment they are replying to. Which means you see the same main comment appear over and over again.
I need a break.
https://docpop.org/2024/08/sharing-photos-from-the-day-of-red-sun-in-san-francisco/
-
@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.
https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/20
-
Terence Edenreplied to Alaric Snell-Pym last edited by
Yup. Here's the little code I wrote. You might want to run it note for note.
https://github.com/edent/Tweet2Embed/blob/main/mastodon2html.py
Turns any public Mastodon status into semantic HTML & CSS for embedding.
Happy to answer any questions.
-
Stefan Bohacekreplied to DJM (freelance for hire) last edited by [email protected]
@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.
-
Stefan Bohacekreplied to Stefan Bohacek last edited by
@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.