问题
Im trying to use http://docs.python-requests.org/en/latest/ to log into facebook automatically.
s = requests.session()
params = {'email':'MYEMAILHERE','pass':'MYPASSHERE'}
r = s.post("https://www.facebook.com/login.php/", params = params)
print r.text
But instead of fb showing me the home page it shows the me the "your cookies are disabled"... page.
回答1:
Michael Heimlich made a project for integrating with the Facebook API using python-requests:
https://github.com/michaelhelmick/requests-facebook
Still waiting for the proper REST integration though.
There is also FacePy: https://github.com/jgorset/facepy
来源:https://stackoverflow.com/questions/11472148/how-can-i-log-in-to-facebook-using-python-requests-urllib3