Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nice forum - can you help me with the Twitter App
#1
I think that I followed all steps but I getting this error: {"Exception of type 'TwitterAPIException' was thrown."}

Can you check the code?

Imports TwitterVB2
Public Class twitter
Public tw As New TwitterAPI
Dim consumer As String = "QQT9vjRAYODUr8VNDM6A5w"
Dim consumersecret As String = "4fM7Tkw24HpWlCxh3hJPyjNbu1jtKuUWtvUSJyf94g"
Public oauthtoken As String
Public oauthtokensecret As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim url As String = tw.GetAuthorizationLink(consumer, consumersecret)
Process.Start(url)
Catch ex As Exception

End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = "" Then
MsgBox("You must insert a code!")
Else
'Proceed
Dim isValid As Boolean = tw.ValidatePIN(TextBox1.Text)
If isValid = True Then
oauthtoken = tw.OAuth_Token
oauthtokensecret = tw.OAuth_TokenSecret
tw.AuthenticateWith(consumer, consumersecret, oauthtoken, oauthtokensecret)
Label2.Text = tw.AccountInformation.Name
Else
MsgBox("Wrong code!")
End If
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
tw.AuthenticateWith(consumer, consumersecret, oauthtoken, oauthtokensecret)
tw.Update(TextBox2.Text)

End Sub
End Class


Messages In This Thread
Nice forum - can you help me with the Twitter App - by romanos8 - 07-27-2011, 01:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to retweet using Twitter vb tim687 0 8,217 02-13-2013, 08:55 AM
Last Post: tim687
  What Happened to the Forum?! brandonio21 1 10,776 02-21-2011, 11:48 AM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)