Crosspost From Mastodon To Twitter or vice versa

Some still have lives in Twitter and find it hard to let go, they might want to keep followers from both sides updated as well.

There are tools like Moa and Crossposter. But these services are shutting down ever since Twitter decides to limit their API and start charging it.

Why not just "do it yourself" and use IFTTT? IFTTT free plan allows you to create 2 apps. Which is perfect for what we want to do here.

Prerequites:

  • Setup an IFTTT free account
  • Link up your Twitter account in IFTTT
  • Generate a Mastodon token
  • Buy me a 🧋 on Ko-fi
💡
Do not use both at the same time otherwise there'll be a loop.
Advanced setup is required for enable crossposting on both sides.

Setting up crosspost from Mastodon to Twitter

  1. Login to IFTTT and Create an Applet
  2. For If, search for New Feed Item and the Feed URL would be your Mastodon profile with a .rss at the back, ie. https://mastodon.sg/@alwynispat.rss
  3. For Then, search for Post a Tweet and select your Twitter Account, in the Tweet Text, enter {{EntryContent}}
  4. Save and that's it!

Now when ever you post something on Mastodon, it'll appear in Twitter within the hour.

Setting up crosspost from Twitter to Mastodon

  1. Login to IFTTT and Create an Applet
  2. For If, search for New Tweet by You and select your Twitter Account.
    Optional: include your Retweets or @Replies.
  3. For Then, search for Make a Web Request.
    1. URL: [Mastodon URL]/api/v1/statuses, ie. https://mastodon.sg/api/v1/statuses
    2. Method: POST
    3. Additional Headers: Authorization: Bearer [Mastodon Token with write:statuses]
    4. Body: status=<<<{{Text}}>>>
  1. Save and that's it!

Now when ever you post something on Mastodon, it'll appear in Twitter within the hour.