需要使用 vb.net 的 facebook 自动喜欢和自动评论的源代码,到目前为止,我们只创建了自动登录。
我们的登录源代码是:
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