URL Schemes in Twitterrific
What is the URL scheme for Twitterrific?
URL schemes can be used by other applications to communicate with Twitterrific. The protocol for the URL is the application's name:
twitterrific5:// is provided for backward compatibility.
Choosing the Account
When communicating with the app, you can optionally specify an account using the URL host. For example, to use the CHOCKLOCK account you'd specify:
You can get the current account by specifying "current" or a blank string for the host. For example:
In Twitterrific on iOS the current account is the last one used. On macOS, the frontmost timeline is considered the current account; if there is no timeline one will be opened using the primary account.
Opening the App
If you just want to open the application, you can use:
The second example will also open the specified account.
Selecting a Timeline
You can select one of the timelines using the following URL resources:
Opening Searches and Lists
When opening a search or list timeline, you'll also need to specify a query or name:
All query parameters should be percent encoded per RFC 2986.
An invalid or blank list name will present the list selection interface.
Viewing Tweets and Profiles
Tweets and user profiles can be opened using the following syntax:
Posting a Tweet
To open the compose view with a pre-populated message use this URL:
You can also supply a tweet ID to generate a reply:
Opening Message Threads
To open a message thread with a user and send them a message, you'll need to supply their user ID as a parameter:
To get a user ID, you can use Twitterrific's user profile. It shows the user ID formatted as #643,443 – remove the hash and commas and use the numbers only.
Creating Muffle Rules
You can add a muffle rule to the selected account using any percent-encoded text:
The last two examples show how this feature can muffle hash tags (%23 is '#') or user accounts (%40 is '@').
Now that you've seen all the available functions and parameters, you may need some guidance on how to apply them in your preferred coding environment. The sample code below covers the most common uses.
To post a tweet from Twitterrific on iOS, you'd use the following Swift code:
let scheme = "twitterrific:" let account = "account/CHOCKLOCK" let function = "post" let parameters = "message=Poopin'