TweetDuck icon indicating copy to clipboard operation
TweetDuck copied to clipboard

Add Pin / Unpin tweet context-menu items

Open koobs opened this issue 5 years ago • 0 comments

Add the ability to Pin / Unpin a particular tweet, to the current tweet context menu item.

Twitter mentioned adding pinned tweets to the API back in 2014

While nothing seems to be currently documented, the Twitter web client appears to be using API endpoints to implement their Pin / Unpin features.

Inspecting the features, it looks like the following is available:

Pin:

  • XHR POST to https://api.twitter.com/1.1/account/pin_tweet.json, with Request Headers:
  • content-type: application/x-www-form-urlencoded
    • tweet_mode=extended&id=tweet-id
  • Response payload: {"pinned_tweets":[pinned-tweet-id]}

Unpin:

  • XHR POST to https://api.twitter.com/1.1/account/unpin_tweet.json, with Request Headers:
  • content-type: application/x-www-form-urlencoded
    • tweet_mode=extended&id=tweet-id
  • Response payload: {"pinned_tweets":[]}

See Also:

koobs avatar Sep 20 '19 05:09 koobs