Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to tweet a message using terminal.

I tried something like:

curl -u 'TwitterUsername':'TwitterPassword' -d status=”Your Message Here” https://twitter.com/statuses/update.xml

but seems this isn't working anymore.

I get a error like this one:

<?xml version="1.0" encoding="UTF-8"?>
    <errors>
    <error code="53">Basic authentication is not supported</error>
</errors>

So, how could we tweet from the terminal?

PS.: my motivation to this is because I use the Yakuake terminal a lot, and it would be awesome to tweet from there.

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

This error message is because Twitter needs OAuth for authentication. Take a look at TTYtter if you don't mind a Perl app:

Noooo, not another Twitter client! Yes, another Twitter client. The difference here is that you're dealing with a multi-functional, fully 100% text, Perl command line client.

  • In interactive mode, it is a fully interactive client with asynchronous background updates and commands. Use it over telnet, ssh or even a dummy terminal. Supports Streaming API, ANSI colour, UTF-8, hashtags and Twitter Search!
  • Works within your favourite environment: use a compatible readline library (like our own bespoke Term::ReadLine::TTYtter), or modify prompt and input methods for many popular window and session managers. Or don't: basic editing and screen management features built-in.
  • From the command line, use it to update your Twitter in shell scripts, from cron, and so on.
  • Security: Supports Twitter OAuth and HTTP Basic Authentication, and SSL where supported by your user agent.
  • Notification support with Growl and libnotify (and extendable to others via the API).
  • Geolocation support: hand your GPS coordinates to TTYtter for any application.
  • Lists support, including fast creation and modification, and merging lists with your timeline as "custom timelines."
  • Supports Twitter-alike APIs such as StatusNet and Identi.ca.
  • Supports standard timelines and automatically fetches direct messages, and optionally replies/mentions, and runs queries against the Search API and incorporates them into your timeline as well.
  • New and old re-tweet support.
  • Write and use your own custom extensions!
  • Run detached in -daemon mode, and make your own Twitter bot!
share|improve this answer
2  
+1 for TTYtter. I'm not a huge fan of Twitter, but it's definitely is one of the better clients. The Irssi plugin isn't that great, compared to TTYtter. –  polemon Jul 1 '12 at 17:04
add comment

Try T. Very powerful, easy to use and written in Ruby.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.