Using Twitter from Linux/BSD Terminal

Discussion in 'Linux, BSD and Other OS's' started by RHochstenbach, Jun 22, 2010.

  1. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    Trophy Points:
    Sending Tweets
    It's fairly easy to send Tweets from a Terminal in *nix systems. Just use this syntax:
    curl -u username:password -d status='Tweeting from my Linux terminal'
    'username' is your Twitter username and 'password' is the password of your Twitter account.

    Note: it might be a good idea to clear the Terminal history because your account's password is displayed inside the command.

    Fetching your Timelime
    To fetch your timeline, use this command:
    curl -s | sed -e '//!d' | sed -n '/^$/!{s/<[^>]*>//g;p;}' | sed -e 's/^[ \t]*//'
    Replace 'username' with your Twitter username.

Share This Page