Automatic Twitter update via bash script and cron..
hehe.. tweet..=~ twitter.com
create a shell script (go_tweet) with following content..
date=`date`;
msg="$1 as of $date"
curl --basic --user "username:password" \
--data-ascii "status=`perl -MURI::Escape -e \
"print uri_escape('$msg');"`" \
http://twitter.com/statuses/update.json
Replace the username:password with your tweet account ..
It is recommended to register a new one for this purpose only if security is your major concern.
[ad#postad]
put somewhere is /usr/local/bin/ or somewhere that you remember..
chmod a+x /usr/local/bin/go_tweet
then.. to update.. just need to run..
/usr/local/bin/go_tweet "your message here.."
for auto update every hour ..
crontab -e
add a line to post uptime output each time..
5 * * * * /usr/local/bin/go_tweet `uptime`
else you can modify it to suit whatever message that you might want to post..
if want to lock twitter to be followed / seen by approved personal only ..
go to home Twitter -> Settings.
tick the Protect update.
and each user that want to follow your update will have to request.. and to be approved you before they can see the update.
p/s : might be useful during content filtering of "Silly Season" soon.. fetching needed RSS / news update only..
my twitter is now feeding live example of weather forecast for every 12 hour.. http://twitter.com/klweather .. any other ideas to be added ?
for this blog feed only is at http://twitter.com/namrannet
[ad#leaderboard]
Here are five key communication skills that help you speak with clarity and influence: Speak…
Are you ready to unlock your full potential as a man?Discover powerful insights, real-life transformations,…
One day we will set aside one whole day to review the whole lesson we…
Last weekend, 07/12/2024 I managed to join Dev Fest Kuala Lumpur 2024, organized by Google…
TIPS BACAAN AL-QURANOleh: Dr. Muhd al-Muhaysni.1. Jangan engkau berikan (fokus membaca) al-Quran pada lebihan waktumu…
Selawat yang ringkas, yang mana apabila kamu membacanya satu kali sebanding 100 ribu kali, jadi…
Leave a Comment