Skip to content

Twitter Tweets

Connects to the Twitter API and displays a single user's tweets.

NOTE: This only works for single-application developer accounts for now.

To make this work, you'll need a couple of things:

  1. Twitter developer account

and one of the following:

a) Twitter bearer token
b) Consumer API keys

You must have either a bearer token or consumer key + consumer secret provided. To get the consumer API keys, you must first create a Twitter application. Then, go to the "Keys and tokens" page and copy the API key and API secret key under the Consumer API keys section.

Once you have your developer account, a relatively painless way to get a bearer token is to use TBT.

Configuration

Single Account

twitter:
  bearerToken: "d23*******************************************3r2"
  count: 5
  enabled: true
  position:
    top: 0
    left: 1
    height: 1
    width: 1
  refreshInterval: 20000
  screenName: "wtfutil"

Multiple Accounts

twitter:
  bearerToken: "d23*******************************************3r2"
  count: 5
  enabled: true
  position:
    top: 0
    left: 1
    height: 1
    width: 1
  refreshInterval: 20000
  screenNames:
  - "golang"
  - "wtfutil"

Attributes

Name Value
bearerToken
Optional Your Twitter single-application Bearer Token. This must be supplied if consumerKey and consumerSecret are not.
consumerKey
Optional Your Twitter Consumer API secret. This must be supplied along with consumerSecret if bearerToken isn't supplied.
consumerSecret
Optional Your Twitter Consumer API key. This must be supplied along with consumerKey if bearerToken isn't supplied.
count
Optional The number of tweets to return per account. Default: 5.
Any positive integer.
screenNames
The screen names of the Twitter users who's tweets you want to follow.

Keyboard

Key Action
/ Open/close the widget's help modal
[return] Open the current Twitter account in the browser
h Show the previous Twitter account
l Show the next Twitter account
o Open the current Twitter account in the browser
r Refresh the data
Show the previous Twitter account
Show the next Twitter account

Source Code

https://github.com/wtfutil/wtf/tree/master/modules/twitter