1 Button
1 Web Browser
3 Text Box
2 Timer
In button1 we want to put the code below this will open Facebook.
Code:
webBrowser1.Navigate("http://www.facebook.com")
timer1.start()Now in timer1 we want you to add this code to log you in.
Code:
if webbrowser1.readystate = webbrowser1.readystate.complete then
WebBrowser1.Document.GetElementById("email").SetAttribute("Value", txtbox1.Text)
WebBrowser1.Document.GetElementById("pass").SetAttribute("Value", txtbox2.Text)
Dim Belement As HtmlElementCollection = WebBrowser1.Document.All
For Each webbutton As HtmlElement In Belement
If webbutton.GetAttribute("value") = "Log in" Then
webbutton.InvokeMember("click")
Timer2.start()
timer1.stop()
end ifOk now it should be logging you i,n now to find out if the page is loaded and then start the spam post.
In timer2 put the code below
Code:
if webbrowser1.readystate = webbrowser1.readystate.complete then
if WebBrowser1.Document.GetElementById("pagelet_stream_header").inertext.contains("News Feed") then
Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea")
For Each el As HtmlElement In htmlElements
If el.GetAttribute("name").Equals("xhpc_message") Then
el.SetAttribute("Value", txtbox3.Text)
Good post.. where's the other part of the code
ReplyDelete