Latest Posts

FEB 8 2010

Twitter with VB follow up
Author:

The video is a bit fast and choppy, but the fundamental process is:

  • get the twitter.vb in place.
  • update the Username,Password lines.
  • A textbox for status (statusText) updates and a textbox for results (results).
  • A button for posting and a button for friend timeline
  • Onclick of post button calls results.text=PostStatus(status.text)
  • Onclick of FriendTimeline button calls
    results.text=push(username,password,FriendTimeline)


  • Downloadification

    0 Comments

JAN 29 2010

Ta-Da! Could SEO be that easy?
Author:

This was really a set it and forget it style SEO attempt. Back in July 2009 I noticed that when I searched for dual monitor backgrounds I ended up on the same site repeatedly and decided there may be a market there. I launched 2xbg.com with no almost content at all until November 2009 with only basic SEO conepts in mind. Acutally it still has virtually no content... just goes to show that SEO is all about the simple and clean basics.

Now I can start to push it a bit further.

0 Comments

DEC 10 2009

Refusal to do slideshow.
Author:

A friend of mine asked for a slideshow for his little league football team... I told him we dont do slideshows. Quality is sketchy thru YouTube.

0 Comments

OCT 20 2009

Twitter simple with VB.NET
Author:


Thought I would share my homebrew Twitter framework. I'll post a sample app using it in a bit.


Imports System
Imports System.IO
Imports System.Net
Imports System.Web
Public Module twitter
    
'hard coded for testing
    
Public username As String = "YOUR USER NAME"
    
Public password As String = "YOUR PASSWORD"


    
Public FriendTimeline As String = "http://twitter.com/statuses/friends_timeline/{0}.xml"
    
Public Publictimeline As String = "http://twitter.com/statuses/public_timeline.xml"
    
Public Archive As String = "http://twitter.com/statuses/user_timeline/{0}.xml"
    
Public Replies As String = "http://twitter.com/statuses/replies.xml"
    
Public Direct As String = "http://twitter.com/direct_messages.xml"
    
Public AuthUser As String = "http://twitter.com/account/verify_credentials.xml"
    
Public Update As String = "http://@twitter.com/statuses/update.xml"
    
Public Followers As String = "http://twitter.com/statuses/followers.xml"


    
Public Function Push(ByVal username As String_
                         
ByVal password As String_
                         
ByVal action As String_
                         
Optional ByVal mode As Integer = 0As String
        Dim 
req As WebRequest
        
If mode Then
            
req HttpWebRequest.Create(String.Format(actionusername))
        
Else
            
req HttpWebRequest.Create(String.Format(action))
        
End If

        
req.Credentials = New NetworkCredential(usernamepassword)
        
Try
            
'returns raw xml
            
Dim res As WebResponse req.GetResponse()
            
Dim ret As StreamReader = New StreamReader(res.GetResponseStream())
            
Dim retData As String = ret.ReadToEnd()
            
ret.Close()
            
Return retData.ToString
        Catch ex 
As Exception
            
Return "There was an error please try again..."
        
End Try
    
End Function

    Public Function 
PostStatus(ByVal status As StringAs String
        Dim 
ret As String
        Dim 
req As WebRequest HttpWebRequest.Create(Update)
        
System.Net.ServicePointManager.Expect100Continue = False
        
req.Credentials = New NetworkCredential(usernamepassword)

        
req.ContentType "application/x-www-form-urlencoded"
        
req.Method "POST"
        
Dim encoding As System.Text.ASCIIEncoding = New System.Text.ASCIIEncoding()
        
Dim bt() As Byte = encoding.GetBytes(String.Format("status={0}"status))

        
Dim As Stream
        Try
            req.ContentLength 
bt.Length
            s 
req.GetRequestStream()
            
s.Write(bt0bt.Length)
        
Catch ex As Exception
            Throw ex
        
End Try

        Try
            
'returns raw xml
            
Dim res As WebResponse req.GetResponse()
            
If res Is Nothing Then
                Return Nothing
            End If

            Dim 
sr As StreamReader = New StreamReader(res.GetResponseStream())
            
ret sr.ReadToEnd().Trim()
            
sr.Close()
        
Catch ex As Exception
            Throw ex
        
End Try

        
Return ret
    
End Function
End 
Module

3 Comments

Follow joemaddalone on Twitter

LATEST POSTS

Twitter with VB follow up Example using my twitter.vb class Ta-Da! Could SEO be that easy? SEO, the set it and forget it way Refusal to do slideshow. We dont do slideshows. Designed for a friend's non-profit Twitter simple with VB.NET Twitter API thru simple VB.NET

ADS

MOST POPULAR

Multiple IEs in Windows Firefox Vs. The World Who Is Xperya? Quick Watermark ActionScript Form Fields IE 7 beta 2 standalone

Chicago Web Design Free Text Messaging Dual Monitor Wallpapers Tattoo Fonts