TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Csharp Ninja
NA
97
178.8k
I can't login to facebook with httpwebrequest
Jun 9 2012 2:11 PM
my codes here:
string postdataman = "lsd=AVpgvQM_&
[email protected]
&pass=12345678&persistent=1&default_persistent=1" + "&charset_test=€,´,€,´,æ°´,Ð",Є" + "&timezone=-180&lgnrnd=104940_e5yZ&lgnjs=1339181436&locale=en_US";
string url = "http://facebook.com";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
byte[] bytearray = Encoding.UTF8.GetBytes(postdataman);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = bytearray.Length;
Stream stream = req.GetRequestStream();
stream.Write(bytearray, 0, bytearray.Length);
WebResponse res = req.GetResponse();
stream = res.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string result = sr.ReadToEnd();
textBox3.Text = result;
if (result.Contains("blabla"))
{
MessageBox.Show("login successful);
}
stream.Close();
res.Close();
sr.Close();
why this code doesnt work :( it cant login to facebook. I am working on this shit for 24 hours... My eyes are hurting a lot now but still I cant solve this problem
Where is my error in my codes :( :(
Reply
Answers (
1
)
how to show cards
Hi again