User Tools

Site Tools


code:shell:post-a-twitter

This is an old revision of the document!


发送一条Twitter消息

#!/bin/sh

curl -d "username=xxx&password=xxx&message=${@}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus

./twitter.sh "post a tweet with twitter.sh"
./twitter.sh "`uptime`"

Auto cut the length limit to 140:

#!/bin/sh

msg=`echo ${@}|cut -b -140`

curl -d "username=xxx&password=xxx&message=${msg}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus

/var/www/dokuwiki/wiki/data/attic/code/shell/post-a-twitter.1356535674.txt.gz · Last modified: 2016/05/05 13:06 (external edit)