Twitter

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. A Twitter developer account
  2. A Twitter bearer token.

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

Keyboard Commands

Key: /
Action: Open/close the widget’s help window.

Key: h
Action: Display the previous Twitter account.

Key: l
Action: Display the next Twitter account.

Key: o
Action: Opens the account in your local browser.

Key:
Action: Display the previous Twitter account.

Key: `→
Action: Display the next Twitter account.

Configuration

Single Account

twitter:
  bearerToken: "3276d7155dd9ee27b8b14f8743a408a9"
  count: 5
  enabled: true
  position:
    top: 0
    left: 1
    height: 1
    width: 1
  refreshInterval: 20000
  screenName: "wtfutil"

Multiple Accounts

twitter:
  bearerToken: "3276d7155dd9ee27b8b14f8743a408a9"
  count: 5
  enabled: true
  position:
    top: 0
    left: 1
    height: 1
    width: 1
  refreshInterval: 20000
  screenNames: 
  - "golang"
  - "wtfutil"

Attributes

bearerToken
Value: Your Twitter single-application Bearer Token

count
The number of tweets to return per account.
Default: 5

enabled
Whether or not this module is executed and if its data displayed onscreen.
Values: true, false.

position
Defines where in the grid this module’s widget will be displayed.

focusChar
Define one of the number keys as a short cut key to access the widget.

refreshInterval
How often, in seconds, this module will update its data.
Values: Any positive integer, 0..n.

screenName
The screen name of the Twitter user who’s tweets you want to follow.
Values: Any valid Twitter user’s screen name.

screenNames
The screen names of the Twitter users who’s tweets you want to follow.
Values: A list of any valid Twitter user’s screen names.

Source Code

wtf/twitter/