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:
    26
    Trophy Points:
    48
    Sending Tweets
    It's fairly easy to send Tweets from a Terminal in *nix systems. Just use this syntax:
    Code:
    curl -u username:password -d status='Tweeting from my Linux terminal' https://twitter.com/statuses/update.xml
    
    '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:
    Code:
    curl -s http://twitter.com/username | sed -e '//!d' | sed -n '/^$/!{s/<[^>]*>//g;p;}' | sed -e 's/^[ \t]*//'
    
    Replace 'username' with your Twitter username.
     

Share This Page