TwitterVB

  • VB.NET

Es gibt 6 Antworten in diesem Thema. Der letzte Beitrag () ist von Scream.

    Hey Comm,
    Ich wollte mit der Twitter dll, herausfinden ob ein Nickname + Passwort richtig ist, wen ja Msgbox..
    ich hatte es so probiert:

    VB.NET-Quellcode

    1. 'dll: http://twittervb.codeplex.com/
    2. Imports ComponentFactory
    3. Imports System.Net
    4. Imports TwitterVB2
    5. Public Class Form1
    6. Inherits ComponentFactory.Krypton.Toolkit.KryptonForm
    7. Dim twit As New TwitterAPI
    8. Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
    9. Try
    10. twit.AuthenticateAs(KryptonTextBox1.Text, KryptonTextBox2.Text)
    11. KryptonButton1.Enabled = False
    12. Catch ex As Exception
    13. MsgBox("falsche eingabe")
    14. KryptonButton1.Enabled = True
    15. End Try
    16. End Sub
    17. End Class


    Vll. weiß jemand weiter..

    LG Scream
    meinste das ?
    Ich entschuldige mich erstmals für den Doppler, der muss jetzt aber sein sonst geht mein Thema mit dem Edit verloren..

    Also ich habe nun alles Registriert etc.
    aber wen ich nun mein Prog teste:

    VB.NET-Quellcode

    1. Imports ComponentFactory
    2. Imports System.Net
    3. Imports TwitterVB2
    4. Public Class Form1
    5. Inherits ComponentFactory.Krypton.Toolkit.KryptonForm
    6. Dim tw As New TwitterAPI
    7. Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
    8. Dim Url As String = tw.GetAuthorizationLink("Zensiert", "Zensiert")
    9. WebBrowser1.Url = New Uri(Url)
    10. End Sub
    11. Dim geladen As Boolean = False
    12. Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
    13. If geladen = False Then
    14. KryptonTextBox1.Enabled = True
    15. KryptonTextBox2.Enabled = True
    16. WebBrowser1.Document.GetElementById("username_or_email").InnerText = KryptonTextBox1.Text
    17. WebBrowser1.Document.GetElementById("session[password]").InnerText = KryptonTextBox2.Text
    18. WebBrowser1.Document.GetElementById("allow").InvokeMember("click")
    19. geladen = True
    20. Else
    21. Dim quelltext As String = WebBrowser1.DocumentText
    22. Dim PinRegex As New System.Text.RegularExpressions.Regex("<div id=""oauth_pin""> (?<Pin>(.*)) </div>")
    23. Dim Pin As String = PinRegex.Match(quelltext).Groups("Pin").ToString()
    24. Dim IsValid As Boolean = tw.ValidatePIN(Pin)
    25. If IsValid Then
    26. MsgBox("valid")
    27. Else
    28. MsgBox("nix valid")
    29. End If
    30. End If
    31. End If
    32. End Sub
    33. End Class


    Dan kommt da "nix valid" ...
    also muss da iwo ein Fehler sein..
    oder kann ich als Ersteller nicht darauf zugreifen?