This is what I'm trying to achieve:
- Login to Facebook via system.net
I've already achieved login through AxWebBrowser... but then I don't know how to disable sound / images / javascript and I occasionally get a JS error which is not cool...
But via System.NET I don't know how to work with cookies... This is what I've got so far (where I'm stuck)
Expand|Select|Wrap|Line Numbers
- Public Class Form1
- Dim web As New System.Net.WebClient()
- Dim james As New System.Net.Cookie
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
- web.Headers.Add(Net.HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)")
- Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes("email=SOMEEMAILADDRESS@comcast.net")
- Dim res As Byte() = web.UploadData("https://login.facebook.com/login.php", "POST", d)
- txtCool.text = System.Text.Encoding.ASCII.GetString(res)
- End Sub
- End Class
Expand|Select|Wrap|Line Numbers
- __qca
- 1172665088-900161-52902507
- facebook.com/
- 1600
- 2350186496
- 32111674
- 2186409104
- 29842226
- *
- login
- ionutz%40comcast.net
- facebook.com/
- 9728
- 1022930048
- 29867537
- 744132816
- 29844254
- *
What I don't know how to do:
- Add more variables to the post string
- How to show facebook through system.net that I "have cookies enabled"
- How to login haha
And as you can tell, SOMEEMAILADDRESS@comcast.net is my e-mail... so if anyone could help, i'd be super-thankful.
The purpose of this program is - pure personal use, I want to make a program that checks for messages on facebook at a given interval of time and will warn me when I get one!
Thanks and looking forward to your reply!