user = 'EMAIL'
passwd = 'PASSWORD'
url = 'https://m.facebook.com/login.php'
br.open(url)
br.select_form(nr=0)
br.form['email'] = user
br.form['pass'] = passwd
br.submit()
response = br.open('https://www.facebook.com/')
fileobj = open('HTML-OUTPUT.txt', 'wb')
fileobj.write(response.read())
fileobj.close()
Python Mechanize log into Facebook cookie error