That’s right guys and gals, you can very easily and quickly post to your twitter account using Visual Basic.net. The function below is a fully functional VB.net 2008 Twitter Posting function.
Simply call the function below as follows:
PostonTwitter(“username”,”password”,”what i want to post”)
Public Sub PostonTwitter(ByVal userName As String, ByVal password As String, ByVal updateMessage As String)
Dim wc As Net.WebClient = New Net.WebClient()
wc.Credentials = New Net.NetworkCredential(userName, password)
Net.ServicePointManager.Expect100Continue = False
Dim updateMessageBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(“status=” + updateMessage)
‘Use UTF8 to get it properly encoded if you use characters like ç ã etc…
wc.UploadData(“http://twitter.com/statuses/update.xml”, updateMessageBytes)
End Sub