Skip Links

Network World

  • Social Web 
  • Email 
  • Close

Updating Twitter with cURL and Wget

Gearhead By Mark Gibbs , Network World , 05/21/2008
Gibbs

Just in case you are a complete noob, let me explain one of the hottest social networking tools, a micro-blogging service called Twitter. Twitter allows you to post messages of up to 140 characters (from your browser or a variety of applications) that can be seen either by the whole Twitter world or by select Twitter users. You can follow what everyone is posting or just follow your Twitter friends. (On Twitter I am "quistuipater".)

So, first up this week is a service that all Twitterholics would love if it actually worked properly: istwitterdown.com. The home page of istwitterdown reads “Yes” or “No” depending on the status of Twitter.com. Sounds cool, but all it actually seems to be telling you is whether the server is responding to pings, which is something that is quite different from whether Twitter is actually working properly, which, at the time of writing, it isn’t. Again. Actually, that should be yet again. Come on Twitter, I know it seems like rocket science, but really. . . .

At the end of this discussion we’ll come back to how istwitterdown should work. . . . 

Anyway, next up, a command line Twitter client. In a corporate context this is something that you might want to use to broadcast a “tweet” (that’s what Twitter messages are called) for events such as status updates for a service or device.

The Twitter REST-based (Representational State Transfer) API is relatively simple, and to post a tweet all you need to perform is a straightforward HTTP POST request. (Oh great, now Twitter is going up and down like a yo-yo.)

An easy way to post to tweet from a command line is to use cURL, a free open source tool that lets you use a URL format to perform data transfers.

cURL is dauntingly overblessed with features and can handle all of the major protocols, including HTTP, HTTPS, FTP, FTPS and even LDAP and Telnet. Better still, cURL is available for a large number of operating systems, including AIX, BeOS, DOS, various flavors of BSD, a huge number of Linux distros, OS X, NetWare (our younger readers may have heard of this), Solaris and Windows (both 32- and 64-bit versions).

To post to Twitter you have to have an account because the API requires you to authenticate. So using cURL in a command or terminal window, you enter a command line as follows (this command should be on a single line and the variables are underlined):

Partner Content

Explore the Ultrium Edge

The powerful tape technology can address data security with tape encryption as well as long term data protection.

Find out more

Disk and Tape Square Off

Discover what disk and tape really cost -- and which solution provides lower total cost of ownership and optimizes energy use for your organization

Download the White Paper

Don't Fall For The Myths

The Clipper Group explores the truth behind the myths of tape, digging into the misconceptions in the disk vs. tape debate.

Download the White Paper

Will You Add Tape Too?

Over two thirds of disk-only users look to add tape back into storage infrastructure according to recent survey.

Download Survey Information

Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a NetworkWorld account? Log in here. Register now for a free account.

Videos

rssRss Feed

Whitepapers

Sun Microsystems: The Green Tide Is Coming. Pressure Builds for an Energy-Efficient Data Center

It's safe to say that most companies, if presented with hard numbers on their energy consumption...

Consolidated Disaster Recovery Using Virtualization

Server virtualization is providing enterprises of all sizes with exciting new options for...

Secure Wireless Printing Options

Discover how you can reduce the TCO of your wireless printers in this whitepaper. Learn how to...

Webcasts

Direct from Microsoft: Tips for Integrating Exchange 2007 and Double-Take Software

Double-Take (r) Software and Microsoft are teaming up on September 9, 2008 for a webinar focusing...

Transforming the Enterprise WAN Edge: Video from Cisco

Life on the edge of your WAN has changed dramatically. With the need to deliver advanced services,...

PoE Plus: Impact on the PoE Market

The standard for Power over Ethernet (PoE), IEEE Std. 802.3af(tm)-2003, advanced networking,...

Special Reports

The New Network/System Management Challenges

Increasingly popular technologies such as virtualization, wireless networking and data center...

Virtualization Reality Check

Find out why analysts say approaching virtualization with an ounce of caution is wise. And also why...

Closing the Loop: Extending Wireless LAN Security to Wireless Printers

Enterprises cannot overlook wireless printers when assessing network security. The print jobs and...

Get instant email notification when white papers, webcasts, executive guides are added to our library. Stay informed and up-to-date with the latest on IT Technologies with Network World's Resource Alerts.