Instagram just rolled out Threads, the company’s new text-based social network that’s been advertised over the past few weeks as an alternative to Twitter. I’m trying out Threads (you can find my account at threads.net/@viticci) and in the process of setting up the list of people I want to follow, I immediately run into an annoying issue that I fixed with a shortcut.
There are several aspects of Threads I want to get into at a later time (the app is iPhone-only, like Instagram; their promised ActivityPub federation isn’t available yet; there is no chronological timeline), but for now, let me explain the problem I’ve been having for the past hour or so. After leaving Twitter, I rebuilt my social graph on Mastodon. Since Threads rolled out on the App Store earlier today, a lot of the people I follow on Mastodon have been posting links to their Threads profiles, which is a convenient way to re-follow them on the new service. However, when I click on profile URLs from the popular app Ivory, I get an error because the app thinks I clicked on a Mastodon profile URL:
It’s not any better on the Twitter website: after logging in with my account and clicking on some profile URLs, I was presented with Threads webpages that do not have a Follow button at all:
I thought there would be an opportunity to make this process easier with Shortcuts, especially right now that a lot of folks are signing up for Threads. Fortunately, I was right. It took a bit of reverse-engineering in Shortcuts, but I figured out the URL scheme for opening account pages directly in the Threads app, and I built a shortcut to make the migration process from Mastodon and Twitter much easier and quicker.
The shortcut is called Threader, and it’s meant to be used as a Back Tap shortcut on your iPhone. Back Tap is an Accessibility feature that lets you run shortcuts by double- or triple-tapping the back of your iPhone, which you can set up in Settings ⇾ Accessibility ⇾ Touch ⇾ Back Tap. You can also read more about it here.
Threader uses Shortcuts’ text recognition capabilities to take a screenshot of the Mastodon or Twitter screen you’re looking at, find Threads profile URLs in it, and let you choose which one you want to open directly in the Threads app. It couldn’t be easier: install the shortcut at the end of this post, set it up for Back Tap, then double-tap the back of your iPhone while looking at some posts with Threads account URLs. You’ll be a shown a list of recognized account URLs. Pick one, and once you’re in the Threads app, you can tap the Follow button to follow the selected account (the shortcut can’t do this on your behalf).
Behind the scenes, Threader performs OCR on the screen you’re looking at, uses a regular expression to find Threads URLs, and relies on a URL scheme to open the selected account in Threads.1 It’s a relatively simple shortcut powered by some advanced technology under the hood, which is one of my favorite things about building useful automations in the Shortcuts app.
Ideally, Threads will soon implement Universal Links so that profile URLs will start automatically opening in the app, or Ivory will stop trying to load those links as Mastodon profiles. But neither of those things are going to happen tonight, and tonight is for having fun rebuilding a social graph once again.
You can download Threader below and find it in the MacStories Shortcuts Archive; you can follow me on Threads here.
Quickly open Threads profile URLs in the Threads app. This shortcut takes a screenshot of the current screen in Mastodon or Twitter, finds Threads URLs in it, and allows you to open one direcltly in the Threads app.