Skip to content

Twitter Mode for Emacs – With OAuth

Twitter’s recent removal of basic authentication eliminated the ability to use quick and dirty methods of posting tweets and viewing timelines, such as via the command-line with cURL. There is one twitter mode, twitel.el, that I had already been using. Supposedly it can handle OAuth through the emacs-oauth package, with some minor custom tweaks to the oauth.el file. Unfortunately, I was unable to get this to work.

Then I found twittering-mode.el.

This is a cakewalk to install and use!

You simply need to follow the few basic instructions from the wiki here: http://www.emacswiki.org/emacs/TwitteringMode

When you run twittering-mode for the first time, you will be prompted to login to the twmode twitter app (via a browser). Enter your credentials and you will receive a pin, which you will then enter into the next prompt from the mode. The OAuth authentication requirements are satisfied by use of the twmode twitter app.

Easy peasy, as some of you would probably say.

UPDATE

To avoid repeatedly retrieving and entering a pin, you can store the encrypted tokens in a local file by enabling:
(setq twittering-use-master-password t)

At this time, you need to download the latest .el file (from the HEAD branch) in order to get this to work:
http://github.com/hayamiz/twittering-mode/raw/master/twittering-mode.el

Enter the mode and follow the prompts to set the master password.

Then, instead of needing to get and enter pins from the twmode twitter app, you simply enter the master password.

For more info on this, see http://github.com/hayamiz/twittering-mode/blob/master/NEWS.

Cheers!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

2 Comments

  1. Deimos wrote:

    Hello, nice blog.

    I have a problem with twittering-mode: when I type “M-x twit” I get the message: “Authorization via OAuth failed. Type M-x twit to retry.” I really dont understand what to do, they say something about a PIN code from the web, but there is no prompt to open an url…

    Friday, December 10, 2010 at 9:38 am | Permalink
  2. Fábio Emilio Costa wrote:

    DEIMOS:

    Okay, you’ll need to type the OAuth PIN as soon as it appears to you.

    Tuesday, August 9, 2011 at 3:09 pm | Permalink

One Trackback/Pingback

  1. Twitter in emacs (twittering mode) at rlazo's blog on Thursday, February 17, 2011 at 7:47 pm

    [...] I found this blog post, which explains how to avoid the oauth request every time you start your [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*