TwitterAPIException (Visual Studio 2010)


#1

“TwitterAPIException” is thrown Every time I try to send a message

Public Sub sendMessage(ByVal user As Integer, ByVal message As String)
    'First authenticate
    AuthenticateTwitter()

    'Convert

    Dim send As String

    Dim utf8 As Encoding = System.Text.Encoding.UTF8

    send = utf8.GetString(Encoding.Convert(utf8, utf8,
    utf8.GetBytes(message)))

    'Then send the message
    twitter.SendDirectMessage(user, send)

End Sub