惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
Security Latest
Security Latest
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cybersecurity and Infrastructure Security Agency CISA
Cloudbric
Cloudbric
T
Threat Research - Cisco Blogs
大猫的无限游戏
大猫的无限游戏
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
C
Cisco Blogs
V
Vulnerabilities – Threatpost
S
Security Archives - TechRepublic
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
J
Java Code Geeks
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Know Your Adversary
Know Your Adversary
博客园 - 叶小钗
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
P
Palo Alto Networks Blog
博客园_首页
V
V2EX
WordPress大学
WordPress大学
Schneier on Security
Schneier on Security
月光博客
月光博客
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
美团技术团队
N
News | PayPal Newsroom
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Last Week in AI
Last Week in AI
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
S
SegmentFault 最新的问题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog

Matthias Ott

Hello Again, World This, Still Not for Everyone The Shape of Friction WeissKlang L1 – Punching Above Its Weight Continvoucly Morged Value Webspace Invaders To Affinity and Beyond The Mystery of Storytelling Amateurs! Echoes of Connection Linear() Is Not (That) Linear View Transitions: The Smooth Parts Adding AVIF and WebP Support to My Craft CMS Site Challenge Acoustic Room Treatment and Building Sound Panels, Part 1: Planning Play On Overshoot The HTML Output Element Listening Closely Compressed Fluid Typography The Lifeblood of the Web What Could Go Wrong? That’s My Rank Making Space CSS :is() :where() the Magic Happens Visual Regression Testing for External URLs With Playwright Jane Goodall’s Famous Last Words European Tech Alternatives 🇪🇺 Independent Type Foundry Advent Calendar – Day 24: NaN Independent Type Foundry Advent Calendar – Day 23: Typotheque Independent Type Foundry Advent Calendar – Day 22: 205TF Independent Type Foundry Advent Calendar – Day 21: HvD Fonts Independent Type Foundry Advent Calendar – Day 20: Frere-Jones Type Independent Type Foundry Advent Calendar – Day 19: Fontwerk Independent Type Foundry Advent Calendar – Day 18: Vectro Independent Type Foundry Advent Calendar – Day 17: Studio René Bieder Independent Type Foundry Advent Calendar – Day 16: R-Typography Independent Type Foundry Advent Calendar – Day 15: David Jonathan Ross Independent Type Foundry Advent Calendar – Day 14: Interval Type Independent Type Foundry Advent Calendar – Day 13: Newglyph Independent Type Foundry Advent Calendar – Day 12: Swiss Typefaces Independent Type Foundry Advent Calendar – Day 11: Sharp Type Independent Type Foundry Advent Calendar – Day 10: Colophon Foundry Independent Type Foundry Advent Calendar – Day 9: Commercial Type Independent Type Foundry Advent Calendar – Day 8: Letters from Sweden Independent Type Foundry Advent Calendar – Day 7: Lineto Independent Type Foundry Advent Calendar – Day 6: Ohno Type Company Independent Type Foundry Advent Calendar – Day 5: Milieu Grotesque Independent Type Foundry Advent Calendar – Day 4: TypeMates Independent Type Foundry Advent Calendar – Day 3: Klim Type Foundry Independent Type Foundry Advent Calendar – Day 2: Dinamo Independent Type Foundry Advent Calendar – Day 1: Grilli Type The Independent Type Foundry Advent Calendar 2022 A Conversation With ChatGPT ChatGPT, please explain websites in the words of William Shakespeare Transient Frameworks Leaving Twitter Behind Converting Your Twitter Archive to Markdown The Wrong Question It Wasn’t Written Suspension None of Your Business Shitty Code Prototypes Doing Our Part Patch That Package Brain Dump Generating Accessibility Test Results for a Whole Website With Evaluatory The CSS Cascade, a Deep Dive Updates About Updates How to Delete Your Commit History in Git Unblocking Your Writing Blocks, Part 2: I’m Not an Expert nor a “Thought Leader” Connections No Wrong Notes Better Options Design Debt Finite and Infinite Games Don’t Assume, Validate. Necessity Is the Ultimate Teacher One Egg Go Deep There Is No Secret Code Balancing Risk Blue Eyes, Brown Eyes The Shortcut Boomerang My RSS Feed Collection of Personal Websites Frequency The Illusion of Control The Decisions Journey Write It Down Nownownow Into the Personal-Website-Verse Considering the Opposite What is it for? Unlimited Bowling. Never done. We Are Team Internet. We Need to Save #NetNeutrality. Progressive Search Data loss (also) by JavaScript Books I Will Definitely Maybe Read in 2017 Starting to Write Notes
Syndicating Posts from Your Personal Website to Twitter and Mastodon
Matthias Ott · 2022-10-31 · via Matthias Ott

The hellsite has a new king. And so, many are moving from Twitter to other social networks like micro.blog or Mastodon or are at least trying out those other options while waiting how things might develop.

Cross-posting – or not? #

One of the first questions that comes to mind is: how can I post on both Twitter and Mastodon so that I don’t have to post my status updates separately? A good idea and something that can be done in various ways.

There are, however, a few problems that come with cross-posting from one platform to another. For one, it can look a little weird when your posts on one platform obviously look like they have been written for another platform. Your tweets might contain user handles from Mastodon that don’t exist on Twitter or a Mastodon post could contain a “RT” (for retweet) or quoted tweets. This can look like you don’t really care about the people spending time on the other platform. But especially the user handles can be problematic because people might not know what to do with them or why they look so differently.

But even if you are fine with all that, cross-posting doesn’t solve one of the biggest problems when it comes to posting content online: if you post your thoughts into a silo like Twitter, they are, to a certain extent, out of your control. You can delete (or maybe even edit) them, yes. But when a platform goes down, you end up with the problem of having to export and backup your data again.

POSSE #

Wouldn’t it be great to be able to post tweets, toots, or other status updates on your own site first? Especially the more important ones that you want to preserve? At least, your own site will be with you even when Twitter goes away or your account suddenly gets suspended. This is one of the basic principles of the IndieWeb: publish on your own site, syndicate elsewhere. Or short: POSSE.

You can see an example here on my site. I am syndicating all posts of my microblog section to Twitter, micro.blog, and Mastodon.

The first thing you need to do to achieve all this is to create a section on your site that you can use to post short status updates. This microblogging section then needs an RSS feed. Mine is this one, for example. Whenever you post a status, a new item will be added to the feed. And we can then use the feed to send new items to Mastodon, Twitter, or any other platform.

I won’t cover in this post how you can set up an RSS feed for your site. Yet it shouldn’t be that hard to find solutions online for whatever you are using under the hood of your site. And for the sake of brevity, I will also focus on syndicating your posts to Twitter and Mastodon only.

Syndication with IFTTT #

With an RSS feed in place, the next step is now to use a service that will send new feed items to the different platforms. We’ll use IFTTT for that, so you will need at least a free account there. Of course, you could also use Zapier or any other automation tool that you prefer.

Let’s start with how you can set things up for Twitter.

Syndicating to Twitter #

The first step is to create a new Applet:

Screenshot of IFTTT: New Applet

Now, under “If this”, select “Add” to add a trigger and search for and select “RSS Feed”. Select “New feed item”, which creates a trigger that fires every time a new item is added to your feed. Paste in your RSS feed URL and finish this step via the “Create trigger” button.

Screenshot of IFTTT: Create RSS Trigger

Next, we need to define what should happen when the trigger fires. Select “Add” next to “Then that” and search for and select “Twitter”. Select “Post a tweet” or also “Post a tweet with image”. Connect your Twitter account. For the Tweet text, you can use the fields that are available under “Add ingredient”. You can use {{EntryTitle}},{{EntryUrl}}, or {{EntryContent}}, for example.

Screenshot of IFTTT: Post A Tweet

Select continue, rename your applet if you want to, and complete the process with the “finish” button. And you’re done! 🙌

If you have a free account, your applet will only run once every hour or so. But whenever there is a new item, IFTTT will automatically post a tweet for you.

Syndicating to Mastodon #

With Mastodon, setting up syndication is a little bit trickier. That’s simply because there is no built-in integration for Mastodon in IFTTT. Thankfully, I found a helpful article by Kelson Vibber about “How to Post to Mastodon From Anything Using IFTTT”.

You can still post to Mastodon using a feature called Webhooks. IFTTT Webhooks let you create Applets that can make or receive any kind of web request. So first, we need to activate that.

Go to IFTTT Webhooks and activate the feature by clicking on “Connect“ button.

Now we need to make sure IFTTT is allowed to make a request to post stuff. For this, we need to add IFTTT as an application in the settings of your Mastodon account. Go to Preferences > Development/Your Applications (e.g. on mastodon.social you’ll find it here). Add a new application and enter a name for it. Under Application website, you need to add the full URL of your IFTTT Webhook. You’ll find it on the Webhooks Settings page. From the checkboxes below, only select write:statuses.

Screenshot Mastodon Settings: New Application

Now, everything is ready to create our applet. The first step is the same like in the Twitter example. Create a new Applet and add your RSS feed as the trigger. Now comes the juicy part: Select “Add” next to “Then that” and search for “Webhooks”, select it, and then choose “Make a web request”.

Screenshot of IFTTT - Create a Webhook web request

Now you need to add the details of the request to Mastodon.

The “URL” should look like this:

https://mastodon.example.com/api/v1/statuses?access_token=1234567890

Make sure to replace the mastodon.example.com with the domain of your instance’s server! Also replace 1234567890 at the end of the URL with the access token of the application you created in Mastodon in the settings. To find the token, click on the Application and look for “Your access token”.

The “Method” should be POST.

For the “Content Type”, select application/x-www-form-urlencoded.

Ignore “Additional Headers”. For the ”Body” of the Request, use something like

status={{EntryContent}}

You can also add other ingredients like the URL or date of the post. Just make sure to include the status= part so that everything is working properly.

Lastly, select continue, rename your applet if you want to, and complete the process with the “finish” button.

And you’re done again!

Now, whenever you post a status update on your own site, it will show up (after a little delay) on both platforms. 🎉

Screenshot of a successful test toot

~