Originally Posted By: argv0
you *did* log in, that was actually a response for a successful login right there.

as far as subsequent requests go, you need to use that cookie information and send it back to the browser with each request you make (the point of cookies). Yes, you must store and send back all of the data in those Set-Cookie headers... each one. If you don't, facebook has no way of tracking your previous request and can't detect that you are indeed logged in-- even though *you are*.


Are you sure? Because normally when you login you're redirected to your home: http://www.facebook.com/home.php? and im not getting that data back.

Code:
alias get.hfs.recent {
  sockclose get.hfs.recent
  sockopen get.hfs.recent www.facebook.com 80
}

on *:sockopen:get.hfs.recent:{
  if (!$sockerr) {
    var %i 1
    while ($hget(TB.hfs.cookie,%i).item) { var %cookie %cookie $+($v1, =,$hget(TB.hfs.cookie,$v1),;) | inc %i }
    sockwrite -n $sockname GET /home.php? HTTP/1.1
    sockwrite -n $sockname Host: www.facebook.com
    sockwrite -n $sockname User-agent: Opera/9.00 (Windows NT 4.0; U; en)
    sockwrite -n $sockname Accept: */* 
    sockwrite -n $sockname Cookie: %cookie
    sockwrite -n $sockname
  }
  else { //echo -a sockerr }
}

on *:sockread:get.hfs.recent:{
  sockread %temp
  if (%temp != $NULL) {
    //echo -a OUT2: %temp
  }
}


...and the output:

Code:
OUT2: HTTP/1.1 302 Found
OUT2: Date: Sun, 23 Mar 2008 08:43:22 GMT
OUT2: Server: Apache/1.3.37.fb1
OUT2: Expires: Mon, 26 Jul 1997 05:00:00 GMT
OUT2: Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
OUT2: Pragma: no-cache
OUT2: P3P: CP="HONK"
OUT2: Set-Cookie: next=http%3A%2F%2Fwww.facebook.com%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next_path=%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next=http%3A%2F%2Fwww.facebook.com%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next_path=%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Location: http://www.facebook.com/login.php
OUT2: Transfer-Encoding: chunked
OUT2: Content-Type: text/html; charset=utf-8
OUT2: 0