Facebook Login protection?
-
hey im trying to make an app that will log in to facebook , im using the following method to establish connection and post my credentials: public static void start_post(string strPage, string strBuffer) { //Our postvars byte[] buffer = Encoding.ASCII.GetBytes(strBuffer); //Initialisation HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(strPage); //Our method is post, otherwise the buffer (postvars) would be useless WebReq.Method = "POST"; //We use form contentType, for the postvars. WebReq.ContentType = "application/x-www-form-urlencoded"; //The length of the buffer (postvars) is used as contentlength. WebReq.ContentLength = buffer.Length; //We open a stream for writing the postvars WebReq.Referer = "http://www.facebook.com/index.php?"; Stream PostData = WebReq.GetRequestStream(); //Now we write, and afterwards, we close. Closing is always important! PostData.Write(buffer, 0, buffer.Length); PostData.Close(); //Get the response handle, we have no true response yet! HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse(); //Let's show some information about the response Console.WriteLine(WebResp.StatusCode); Console.WriteLine(WebResp.Server); //Now, we read the response (the string), and output it. Stream Answer = WebResp.GetResponseStream(); StreamReader _Answer = new StreamReader(Answer); reply = _Answer.ReadToEnd(); Console.WriteLine(reply); } i get the following respond from facebook: "sorry, we're not cool enough to support your browser. please keep it real with the following browsers: ...." any idea how to work around this facebook check , as im sending same data as my IE agent i dont know what else will work , asking for your expert help. thank you.
Net
-
hey im trying to make an app that will log in to facebook , im using the following method to establish connection and post my credentials: public static void start_post(string strPage, string strBuffer) { //Our postvars byte[] buffer = Encoding.ASCII.GetBytes(strBuffer); //Initialisation HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(strPage); //Our method is post, otherwise the buffer (postvars) would be useless WebReq.Method = "POST"; //We use form contentType, for the postvars. WebReq.ContentType = "application/x-www-form-urlencoded"; //The length of the buffer (postvars) is used as contentlength. WebReq.ContentLength = buffer.Length; //We open a stream for writing the postvars WebReq.Referer = "http://www.facebook.com/index.php?"; Stream PostData = WebReq.GetRequestStream(); //Now we write, and afterwards, we close. Closing is always important! PostData.Write(buffer, 0, buffer.Length); PostData.Close(); //Get the response handle, we have no true response yet! HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse(); //Let's show some information about the response Console.WriteLine(WebResp.StatusCode); Console.WriteLine(WebResp.Server); //Now, we read the response (the string), and output it. Stream Answer = WebResp.GetResponseStream(); StreamReader _Answer = new StreamReader(Answer); reply = _Answer.ReadToEnd(); Console.WriteLine(reply); } i get the following respond from facebook: "sorry, we're not cool enough to support your browser. please keep it real with the following browsers: ...." any idea how to work around this facebook check , as im sending same data as my IE agent i dont know what else will work , asking for your expert help. thank you.
Net
This is the same question as yesterday. http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2591716 A quick trip to Google shows a lot of hits, so maybe its a known problem with Facebook - try contacting them.
Bob Ashfield Consultants Ltd
-
This is the same question as yesterday. http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2591716 A quick trip to Google shows a lot of hits, so maybe its a known problem with Facebook - try contacting them.
Bob Ashfield Consultants Ltd
i posted that question thought i'll have more luck here , there are no work arrounds mentioned on google , only entioned that facebook sucks for this :P , btw its not a problem its some protection against none cool browsers im looking for a programatic wrok arround
Net