0

I want to write a script that will log in to facebook.

I tried going to this URL:

https://www.facebook.com/login.php?&email=example@example.com&pass=password

but it doesnt work, it just redirects to the same page.

quilby
  • 3,141
  • 4
  • 26
  • 21
  • because facebook ignores them. IIRC, you can specify the email address with post, but not the password. – Wug Jul 09 '12 at 20:02
  • In the google chrome "network" dev tool it says that both params are POSTed – quilby Jul 09 '12 at 20:05
  • Yeah. oops. my comment is mistaken: facebook ignores GET. IIRC, you can specify the email address with GET, but not the password. (not POST) – Wug Jul 09 '12 at 20:08

1 Answers1

2

What you are doing is GET, not POST.

Generally sending a password in a GET query is not a good idea. It is visible as plain text in the browser, in your request, which may be sniffed with a sniffing tool and in your browser history. That's probably why Facebook does not accept it.

Misch
  • 10,350
  • 4
  • 35
  • 49
  • 1
    However, that does not mean that sniffing plaintext POST parameters is much more difficult than sniffing GET parameters (when not using https) – Misch Jul 09 '12 at 20:12
  • Write a little bit of html will do the trick: http://stackoverflow.com/questions/3307379/how-to-send-a-post-request-with-a-web-browser – Misch Jul 09 '12 at 20:14
  • Or use a firefox extension: http://stackoverflow.com/questions/725998/are-there-firefox-extension-or-any-other-browser-that-allow-to-send-arbitrary – Misch Jul 09 '12 at 20:14