{"id":3182,"date":"2023-07-08T19:35:21","date_gmt":"2023-07-08T10:35:21","guid":{"rendered":"https:\/\/www.codedojo.com\/?p=3182"},"modified":"2023-07-17T06:43:55","modified_gmt":"2023-07-16T21:43:55","slug":"why-i-wrote-a-mastodon-feed-widget-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.codedojo.com\/?p=3182","title":{"rendered":"Why I wrote a Mastodon feed widget for WordPress"},"content":{"rendered":"\n<p>So Twitter killed embedded feeds last week.<\/p>\n\n\n\n<p>For many years I&#8217;ve had this website and others showing recent tweets as feeds because it&#8217;s easier to tweet than edit html or make blog posts and it lets people visiting my website know I&#8217;m still alive.  <\/p>\n\n\n\n<p><strong>And now that&#8217;s impossible?!<\/strong><\/p>\n\n\n\n<p>No problem &#8211; I took a few hours to create a Mastodon account (<a href=\"https:\/\/mastodon.gamedev.place\/@rtsoft\">it&#8217;s here<\/a>) and fix these sites to work again.  Mastodon supports rss feeds out of the box which makes embedding a feed child&#8217;s play.  <\/p>\n\n\n\n<p>This is something that neither Bluesky or Threads can currently do to my knowledge.<\/p>\n\n\n\n<p>I started with <a href=\"https:\/\/wordpress.org\/plugins\/include-mastodon-feed\/\">this plugin<\/a> and it worked, but it didn&#8217;t show movies or cache the feed so OF COURSE I had to write my own dumb widget plugin today because I&#8217;m broken like that.  (Also, I knew using <a href=\"https:\/\/simplepie.org\/\">SimplePie<\/a> would make it really easy, I use it for everything)<\/p>\n\n\n\n<p>Anyway, if anybody wants to use my super simple WordPress plugin it&#8217;s here:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/SethRobinson\/rt-mastodon-feed\"><strong>https:\/\/github.com\/SethRobinson\/rt-mastodon-feed<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What does it look like?<\/h2>\n\n\n\n<p>look to the <strong>right of your screen<\/strong> and you should see it in action!<\/p>\n\n\n\n<p>If not, it&#8217;s a piece of crap that broke already, sorry<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings-1024x657.png\" alt=\"\" class=\"wp-image-3183\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings-1024x657.png 1024w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings-300x192.png 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings-768x493.png 768w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings-624x400.png 624w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2023\/07\/codeojo_settings.png 1157w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Here&#8217;s what its settings look like.  i like to leave the typos in, adds some spice<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What about embedding the feed on a site that doesn&#8217;t use WordPress?<\/h2>\n\n\n\n<p>Yeah, I&#8217;m doing that on <a href=\"http:\/\/rtsoft.com\">rtsoft.com<\/a>, I just ripped the guts out of my plugin and hardcoded the links and it works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Do you still use Twitter?<\/h2>\n\n\n\n<p>Yeah, it&#8217;s how a lot of people see what I&#8217;m working on so I&#8217;ll post on both for now.<\/p>\n\n\n\n<p>I&#8217;ve kept sane by using <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/control-panel-for-twitter\/kpmjjdhbcfebfjgdnpjagcndoelnidfj\">Control Panel For Twitter<\/a> both on desktop and iPhone which removes all the crap and lets you have a friends-only feed without ads.  It&#8217;s cool having retweets in a separate tab because that way I can focus on just what friends are saying first and checkout retweets only if I have the time.<\/p>\n\n\n\n<p>Hint: It helps to have a lot of words muted, &#8220;elon&#8221; for one, uh oh, it just occurred to me, sorry if anyone thinks I&#8217;ve been ignoring them who happens to be named Elon, uh, just use email please.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Will you sign up to those other new social media sites?<\/h2>\n\n\n\n<p>Only if I have to.  I put stuff off as long as possible as the last thing I need is more social media.  The concept of &#8220;federated timelines&#8221; interests me though, hope we&#8217;ll be hearing more about that across the social media landscape so we can all use whatever and avoid &#8216;locked-in ecosystem&#8217; hell.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So Twitter killed embedded feeds last week. For many years I&#8217;ve had this website and others showing recent tweets as feeds because it&#8217;s easier to tweet than edit html or make blog posts and it lets people visiting my website know I&#8217;m still alive. And now that&#8217;s impossible?! No problem &#8211; I took a few [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-3182","post","type-post","status-publish","format-standard","hentry","category-development","category-tech-tips"],"_links":{"self":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/3182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3182"}],"version-history":[{"count":13,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/3182\/revisions"}],"predecessor-version":[{"id":3199,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/3182\/revisions\/3199"}],"wp:attachment":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}