How To: Update your Twitter status with ASP
Here is a simple script I wrote in classic ASP to update your Twitter status via the Twitter API. This script handles basic HTTP authentication to validate your Twitter account and URL Encoding to send over friendly status updates.
Response.Buffer = True
Dim xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")twitter_username = "username" ‘change to your twitter username
twitter_password = "password" ‘change to your twitter passwordnew_status = "visit strangework.com!" ‘change to your new status
xml.Open "POST", "http://" & twitter_username & ":" & twitter_password & "@twitter.com/statuses/update.xml?status=" & server.URLencode(new_status), False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.SendResponse.Write xml.responseText ‘view Twitter’s response
Set xml = Nothing
Popularity: 53% [?]
Tags: API, ASP/.NET, How To, script, Twitter.com




























Nicolai Rygh said
am January 5 2008 @ 7:55 am
Hi Brad!
Thanks! I’ll include it in my posting tool for my blog!