Blogging in Lisp



Submitted by Bill St. Clair on Thu, 23 Nov 2017 16:50:01 GMT

I recently started using Twitterrific, a Mac and iOS Twitter client. I like that it syncs between my iMac and iPhone, and its "Delete and Edit Tweet" feature, something that I occasionally do by hand in Twitter's interfaces, to fix a typo. But I'm missing a few features:

  1. Link previews.
    I follow some accounts that link to meme images, and seeing at least part of the image before clicking on it is handy.
  2. List retweeters of a Tweet. Twitterriffic shows a retweet count, but, unlike Twitter's clients, has no way to show the list of people who retweeted.
  3. List likers of a Tweet.
    Again, Twitterrific shows a like count, but has no way to show the list of likers.

I tweeted about the second and third issues above, and received this reply:

I can find no API for listing who likes a post, but there is definitely an API for reposters.

The examples below use twurl, Twitter's curl-like command line tool, that sends raw URLs to the Twitter API, does all the OATH validation for you, and returns the raw JSON.

First, show a recent Tweet from President Trump (long lines elided):

$ twurl '/1.1/statuses/show.json?id=933692459351265280&trim_user=1&include_entities=0'
{"created_at":"Thu Nov 23 13:43:24 +0000 2017",
 "text":"Will be doing a live Thanksgiving Video Teleconference with Members of the Military...",
 "source":"\u003ca href=\"http:\/\/\/download\/iphone\" ...",

Look up the retweeters, limited to 5. The default, and maximum, is 100, though you can use a 'cursor' to fetch additional pages of 100.

$ twurl '/1.1/statuses/retweeters/ids.json?id=933692459351265280&count=5'

Lookup details on one of those user IDs:

$ twurl '/1.1/users/lookup.json?user_id=140410587&include_entities=0'
  "name":"Trump supporter",
  "description":"El comunismo no debe existir en el planeta...",

I don't know why Twitter has no API to fetch the users who liked a post (which are called "favorites" in the API docs). You can get the posts liked by a user, but not the users who like a post. Unless you screen-scrape the web UI, which is fraught with peril, and no fun.

I hope this post will encourge the Twitterrific people to add to their clients the ability to show retweeters for a post.

Add comment   Edit post   Add post

Previous Posts:

iPhone X Ad Swirling Colorful Sand
Archmage Is Done!
MacOS High Sierra
Going Supersonic in Elon Musk's Test Hyperloop Tube
2017 iMac
Spokes is Done!
Mirroring a Blogspot Site
Xossbow Progress Report
Diceware Passphrase Generator Updated