multipostter - A Multi-Posting Tool with No Hassle
Background
It is the Warring States period of SNS. The world of text-based microblogging SNS is in chaos.
In the past, you could obtain plenty of information simply by looking at Twitter. However, ever since user-friendly clients disappeared, retrieving information has become difficult. Moreover, from a broadcasting standpoint, the information that used to spread widely by posting only on Twitter is now harder to reach people due to the scattering of users.
Fragmented Networks
Some SNS platforms use a common protocol that allows access to other networks. A famous example is the mastodon servers and Misskey servers connected by ActivityPub, where you can view and reply to each other’s posts. There are also platforms like Bluesky based on the open ATProtocol, making interconnection easier.
On the other hand, if the protocols differ, seamless integration becomes challenging, and each SNS handles it differently. For instance, Threads joining the fediverse has taken a long time.
Ideally, all networks would be interconnected, allowing you to immerse yourself in your favorite SNS while easily peeking at others, creating a situation where “you can see it all through one window.” However, this is difficult in reality.
Countermeasures
Given the current state, what measures can be taken? A simple solution is multi-posting the same content on each network.
Take, for example, Frieren, who wields magical powers to master Bluesky. You’ll notice that some of their posts from the old Twitter are being relayed to Bluesky. The reason why only some posts are relayed is unclear, but perhaps only important announcements are shared. In this way, multi-posting to different networks makes it easy for people using a Bluesky client to access the information.
Let’s look at specific multi-posting methods. Although we talk about multi-posting in general, there are two broad approaches.
Multi-Posting - push type
The first is a method of posting to multiple networks at the time of posting. Let’s call this push type. You see it relatively often.
This approach does not require a server, can reflect posts in real time, and allows fine customization for each posting destination. If you want to fully utilize each SNS’s features, this is one option.
On the other hand, the major downside is that you need a specialized client for posting. Since you can’t use the client you’re used to, and it’s often separate from a reader, there’s a risk of giving up on it because it becomes too much hassle. It might be suitable for companies that want to control all their posts, but for the average person, it can be quite difficult to adopt.
push型
Multi-Posting - pull type
Another method is to detect a post and mirror it across multiple networks. Let’s call this pull type.
In this approach, you designate one network as the main, detect the posts there, and then relay them to other networks. The downside is that it requires a server, causes delays, and cannot take advantage of unique features of each SNS. However, it offers the significant advantage of enabling multi-posting without hassle.
pull型
In the tool created this time, I decided to use the pull type for multi-posting.
Technical Details
Constraints and Design
To suit the current environment, I chose Misskey.io as the main network and specified Bluesky and the old Twitter as mirror targets. This can be changed, but for now, the Twitter API is free only for write operations, so we can’t use it as the main network.
Next, I define a universal posting format that applies to these SNS platforms. I pull posts from the main network, convert them into this format, and then relay them to other networks.
The format consists of generic elements like the post text, any attached images or videos, and the posting time. However, each SNS has its own restrictions on attached files. Misskey.io has the least restrictions and generally doesn’t require special consideration, but for Bluesky, each file is limited to 1MB, while on the old Twitter, you can only attach up to four files. I implemented this with these limitations in mind.
Fetching Posts from Misskey
By referring to the Misskey.io API Doc, you can fetch posts via HTTP requests[1]. You can also exclude replies and renotes, making it easy to get a list of posts for relaying to other networks.
Fighting Against Bluesky’s Size Limit
As mentioned, Bluesky’s attachment file size limit is extremely strict, at just 1MB per file. Therefore, this tool uses sharp to downsize images attached to posts fetched from Misskey.io, ensuring the file size is reduced sufficiently.
Server with No Hassle or Cost
This tool has a fully serverless architecture and uses IaC, making it easy to manage.
The component that fetches and relays posts runs on AWS Lambda[2], executed every 10 minutes. A delay of about 10 minutes should be acceptable. Managing how far we have posted involves writing just one record to DynamoDB.
Not only is this setup easy to manage, but it also fits within the free tier, so it can be achieved at zero cost[3].
Additionally, IaC is done with the AWS CDK, allowing you to deploy with a single command. Even if something breaks, you can easily fix it.
Usage
The source code is available on GitHub. Since using it requires knowledge of AWS and each SNS’s API, it’s not for everyone, but if you’re interested, give it a try.
Conclusion
If an SNS doesn’t offer an API, it’s done for!
There was also a JavaScript client, but it has been archived https://github.com/misskey-dev/misskey.js/ ↩︎
It’s somewhat challenging to deploy sharp on Lambda ↩︎
It might cost a little bit, but under normal usage it should be less than $1 ↩︎