Facebook自动喜欢并自动评论机器人

时间:2013-09-12 07:50:29

标签: .net vb.net facebook-like bots facebook-comments

需要使用vb.net的facebook auto like和auto comments的源代码,到目前为止我们只创建了自动登录。

我们登录的源代码是:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fb_button.Click
    Dim fb_button As String = Nothing
    For Each element As HtmlElement In WebBrowser1.Document.All
        If InStr(element.Id, "u_0_b") Then
            fb_button = element.Id
        End If
    Next
    WebBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
    WebBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox2.Text)

    WebBrowser1.Document.GetElementById(fb_button).InvokeMember("click")

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    WebBrowser1.Navigate("https://www.facebook.com/")
End Sub

1 个答案:

答案 0 :(得分:0)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fb_button.Click
    Dim fb_button As String = Nothing
    For Each element As HtmlElement In WebBrowser1.Document.All
        If InStr(element.Id, "u_0_b") Then
            fb_button = element.Id
        End If
    Next
    WebBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
    WebBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox2.Text)

    WebBrowser1.Document.GetElementById(fb_button).InvokeMember("click")

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    WebBrowser1.Navigate("https://www.facebook.com/")
End Sub