Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Facebook Login protection?

Facebook Login protection?

Scheduled Pinned Locked Moved Web Development
phpdatabasecomsysadminagentic-ai
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udikantz
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • U udikantz

      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

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      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

      U 1 Reply Last reply
      0
      • A Ashfield

        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

        U Offline
        U Offline
        udikantz
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups