Post to Twitter from the Terminal Window

Sponsored Link
If you want to post to Twitter from the Terminal Window in Ubuntu use one of the following methods.curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling.

Install curl in ubuntu

Open the command prompt and enter the following command

sudo aptitude install curl

Enter your root password when it is prompted.

Using curl

Now if you want to post to Twitter use the following command in single line

curl -u yourusername:yourpassword -d status=”Your Message Here” https://twitter.com/statuses/update.xml

You will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.

Using wget

Enter the following command in single line

wget -O -- –user=YOURUSERNAME –password=YOURPASSWORD –post-data=”status=YOUR NEW STATUS HERE” https://twitter.com/statuses/update.xml

Using ZenTwitter

Download ZenTwitter from here

Installation

Just dump it into your ~/bin directory, open it in the editor of your choice to change the username/password, make it executable (chmod a+x) and add a launcher icon to the panel/menu/desktop of your preferred window manager.

Screenshot

Sponsored Link

You may also like...

3 Responses

  1. Hemanth says:

    Nice use of zenity 🙂

  2. Andrew Neil says:

    The wget command line is incorrect for GNU Wget 1.11.4 on Windows:

    -user should be –http-user
    -password should be –http-password

    Also, –no-check-certificate seems to be required.

    Even then, Twitter rejects the request with HTTP 401, “Unauthorized”

    I think this is because Twitter has changed their autorisation scheme?

    Is it still possible to Tweet using wget?

Leave a Reply

Your email address will not be published. Required fields are marked *