The Internet environment in Jianzhong is getting worse and worse. I didn’t want to speak on social platforms for a long time, but I also figured out that the record itself is meaningful. The more commonly used platforms for recording fragmented thoughts, except for Weibo, which is restricted everywhere, are Mastodon (translated into mammoth or mastodon, see the introduction: Mammoth Mastodon Edible Guide ) and Twitter, the former can be freely deployed on its own server You can go online or choose a site built by a webmaster you trust. The latter must be scientifically surfing the Internet, and there are a lot of advertisements.
The method I choose now is Weibo + Mastodon. On the one hand, because various interest circles are still in the Jianzhong network, I cannot force everyone to migrate. On the other hand, I want to build a trumpet that no one uses, and no one pays attention. Speak more freely, you can speak well. The Weibo environment is really bad, and we are constantly deleting blogs and bombing accounts, so I thought of a question, can I synchronize the content on Weibo to Mastodon as a backup?
Weibo Sync Mastodon
After inquiring about relevant information, the common method used to be to use IFTTT, but since the Weibo API of IFTTT is unmaintained, it is not so easy. “Let’s talk about synchronizing social networking sites to Mastodon (Weibo, RSS, native pictures ) ” This article talks about two ways to convert Weibo to RSS, and then use tools like IFTTT to implement the processing method. The free method has an ugly format, and the paid method is in It is too expensive, and I am not very good at dealing with other platform codes such as u8u.
Another method was found on Github: Weibo forwarding mammoth bot (there are some bugs in the PS source code, you can use my modified weibo2mast ), the logic here is to first grab Weibo locally, and then use the code Handling publishing to Mastodon, the procedure is very simple, it can be deployed on a server or just run locally, and it works great.
If real-time synchronization is required, it is recommended to build it on the server for 24 hours. If it is only a small amount of synchronization, it can be run locally, encapsulate xpost.py into a script, set it as a task scheduler, and synchronize new Weibo regularly every day.
Mastodon Sync Twitter
After realizing the synchronization of Weibo with Mastodon, I thought about whether it is possible to establish synchronization from Mastodon to Twitter. I searched for a lot of information on this aspect. The method of IFTTT is very useful, mainly because the API of Twitter is very efficient.
However, Mastodon Twitter Crossposter is more recommended here. The settings are clear and can be synchronized in almost real time, which is more friendly than IFTTT.
Wordprees Sync Mastodon
If you are a frequent blogger, sometimes you also want to synchronize the record of updating the blog to Mastdon. For such content that can obtain RSS, synchronization can be achieved with IFTTT. Take the self-built WordPress blog as an example, first create an application in Mastodon’s preferences – development, and the permission scope can only check write.
Click the created application to get the access token, which will be used in subsequent settings.
Open IFTTT and create new Applets. The first step is to select RSS in If this, then select New feed item, and fill in the blog RSS address in the Feed URL. Generally, the RSS address of a WordPress blog is the blog address followed by /feed, which is very simple. If you want to use IFTTT for microblog synchronization, you need to convert the microblog into an RSS address, which is more complicated. In short, as long as there is RSS content Almost all can be synchronized in the same way. Click Create Trigger when done.
The second step is to select Webhooks in Then That, and then select Make a web request, make your own settings according to the following rules, and click Create Action after completion.
URL: https://your-instance-address/api/v1/statuses
Method: Post
Content Type : application/x-www-form-urlencoded
Body: access_token=your access token&status=<<<>>> %0A <<<>>> %0A <<<>>>
The Body here can click the Add ingredient button to choose the content you want to present. For example, I have now selected the title, connection and blog post content.
This article is reproduced from: https://utopia.pursuitus.com/archives/4189
This site is for inclusion only, and the copyright belongs to the original author.