Chris Messina Posted May 6, 2021 Share Posted May 6, 2021 I'd like to add more robust DM support to my Twitter Toolkit for Alfred workflow. I've come up with a basic flow for how I think it could be achieved but would love your guidance and help on how to go about implementing it, since I'm not a developer: Authenticate a local Twitter client to get one's followee list; store the list containing IDs, usernames, and display names Load this list as a CSV into a List Filter Use dm to access type-to-suggest completion using that List Filter in Alfred's UI Upon actioning, open the URL prefilled with https://twitter.com/messages/{var:userId}-{query} (where query is the user ID of the recipient) If a space is typed after the username, use that text to prefill message text The basic user-facing flow would be: Type `dm ` Starting typing usernames to initiate autocomplete Choose the desired recipient from the list Type the text of your message Action in order to open a URL prefilled with the recipient ID and your type message. Thoughts? Link to comment
deanishe Posted May 7, 2021 Share Posted May 7, 2021 What do you mean "a local Twitter client"? Getting the list of people you follow is the hard part. A List Filter sounds a bit silly. Unless you're creating the list of people you follow manually (which sounds unpleasant), then you won't want to be editing the workflow, either. It should be a Script Filter. Link to comment
Chris Messina Posted May 7, 2021 Author Share Posted May 7, 2021 1 hour ago, deanishe said: It should be a Script Filter Cool, as I don't know how to write code to use the Script Filter, SGTM! I just need a way to populate Alfred so that after I type `dm`, it starts autosuggesting usernames from the people I follow, and then once I action it, it will grab that username and convert it to a user ID in order to slot-fill the URL! 😅 Link to comment
deanishe Posted May 7, 2021 Share Posted May 7, 2021 1 hour ago, Chris Messina said: Cool, as I don't know how to write code to use the Script Filter, SGTM! It's pretty simple. Which language are you using? Link to comment
Chris Messina Posted May 7, 2021 Author Share Posted May 7, 2021 8 hours ago, deanishe said: It's pretty simple. Which language are you using? Perhaps it would make sense to use an existing Twitter Client to handle authentication, etc. Perhaps Twurl (GitHub repo) would be sufficient? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now