DISQUS

Christopher S. Penn's Awaken Your Superhero: How to Twitter from Terminal on the Mac

  • Daniel Johnson, Jr. · 2 years ago
    Anyone know if this or something similar works in windows?
  • Chris Brogan... · 2 years ago
    That's for outbound, right? Is there a way to "tail the log" and watch realtime status come IN?
  • Andrew Pennebaker · 2 years ago
    Thanks! I added the silent option and sent the stdout text to heck:

    #!/usr/bin/env sh
    curl -u yourusername -d status="$1" -s -o /dev/null http://twitter.com/statuses/update.xml
  • carlos · 1 year ago
    Hi,
    I work with ubuntu 7.10
    I've follow the steps but when I type in the terminal:
    tw
    and ask for my host password I enter my twitter pass, but it says:
    Couldn't resolve host
    The host pass and the twitter pass are different?
    Thanks
  • carlos · 1 year ago
    Now, works fine. I don't know what's happened.
    Only to add the script works in gnu/linux OS too
    Regards
  • Murphy Mac · 1 year ago
    Does this not work with the curl that ships with Leopard? I left my password out of the command, was prompted for it, but my post didn't appear. I saw the html go by.

    Cool. I'll be looking into Chris Brogan's question. I'm definitely interested in seeing Tweets in the Terminal.
  • Christopher S. Penn · 1 year ago
    Dunno - as a rule, I typically compile major packages I know I'm going to use from source. That's a me oddity :)
  • crimeboy · 1 year ago
    to improve that, and use without commas i make it


    crimeboy@groselia:~$ cat twi
    #!/bin/bash
    # requires curl
    ###########################

    ######## CONFIG
    USER=YOULOGIN
    PASS=YOURPASS
    URL="http://twitter.com/statuses/update.xml"
    ###############
    curl -u $USER:$PASS -d status="$*" -s -o /dev/null ${URL}
  • Jesse · 1 year ago
    Hello,

    I like you script, its simple and sweet. I only have to say that its probably not a good idea to advise people to chmod something to 777. This would enable other users (who would have access to your machine or network) to see not only the password which is hard coded in the script, but to change the script and insert something malicious. Perhaps something a bit more conservative like 700 would be a better choice. This value would mean that the owner (you) has read, write and execute permissions on the file, but no one else. I know you probably, and rightfully trust the people on your network, but hey--its the same amount of typing and you get free security :).

    Kind Regards,

    Jesse
  • Bonnie · 1 year ago
    This looks great. I don't know anything about compiling commands so I tried the curl that comes with OS X. When I try this only the content up to my first space is posted on Twitter. Do you think that's my curl or is there something else you think it might be?
  • Bonnie · 1 year ago
    Huh, my quotes looked funny around the $1 - I created the text file using the cat command. Fixed the quotes with pico, they look right now, and it works. Thanks.