We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

gtcaz on 03/18/07


Tagged

curl commandline twitter


Versions (?)


Who likes this?

8 people have marked this snippet as a favorite

tylerhall
happolati
cwoodley
vali29
copyleft
sjaq
therobot
noah


Twitter from the command line using curl


Published in: Bash 


URL: http://www.morethanseven.net/posts/posting-to-twitter-using-php/

  1. curl -u username:password -d status="twittering from curl" http://twitter.com/statuses/update.xml

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: noah on March 27, 2008

curl -u noahsussman:bluecell -d status="Slightly less verbose output." http://twitter.com/statuses/update.xml | grep truncated

Posted By: noah on March 27, 2008

Ha ha or you can leave off your password and it will prompt you interactively; so it doesn't wind up in your history file (or, say, published on the Internet).

Posted By: noah on March 29, 2008

Also add the -s option for absolutely the least output -- just prints the XML tag that indicates whether a tweet was truncated for being over 140 characters, nothing else.

curl -s -u user:password -d status="Slightly less verbose output." http://twitter.com/statuses/update.xml | grep truncated

You need to login to post a comment.