May 18, 2012

Infomasi Social Media dan Tip Trik Online

Bash Script To Update Twitter


Advertisements

We can update Twitter from anywhere and use any such tools. For Linux users, probably never imagined that the bash script can be used to make a simple Twitter client. :p Bash is a programming language that works in a terminal/console-based in UNIX, typically used for process management or scheduling process.

This script requires CURL, so make sure that CURL is installed on your Linux.
To try it, do the following steps : icon biggrin Bash Script To Update Twitter

<br />$ nano tweet.sh<br />#! / bin / bash<br />_auth = $ 1: $ 2<br />_update = $ 3<br />_url = "http://twitter.com/statuses/update.json"<br />if [-z $ 1] &amp; [-z $ 2] &amp; [-z $ 3]<br />then<br />echo "usage: $ 0 user pass message"<br />else<br />if [-z / usr / bin / curl]<br />then<br />echo "curl is not installed."<br />else<br />/ usr / bin / curl-u $ _auth-d status = "$ _update" $ _url&gt; / dev / null;<br />echo "success";<br />fi<br />fi<br />

Save by pressing Ctrl + X then Y.

Change the file permissions

<br />$ chmod 777 tweet.sh<br />

Try the script

<br />$. / tweet.sh [username] [password] [status-message]<br />

Example

<br />$./ socialblogr tweet.sh **** "Test Bash script to update Twitter"<br />

screenshot4 Bash Script To Update Twitter

Code by weldan

Related posts:

  1. How To : Add Follow Me on Twitter Button to Website/Blog
  2. How To : Add Twitter’s Tweet Button to WordPress, Blogger, Tumblr
  3. Twitter’s Tweet Button (Officially from Twitter)
  4. Smiley/Emoticon For Twitter
  5. How To : Twitter With GnomeDo
Ngonoo - Technology & Social Media Updates
Post comment as twitter logo facebook logo
Sort: Newest | Oldest