title: How to get the same cookies like browser using python request
body: <p>I'm trying to write an app that can login into Facebook Authentication with Python and Requests. I've tried using the code below but it doesn't log into facebook.</p>
  <pre><code>import requests
  payload = {'email:'xxx','pass':'xxx'}
  session = requests.session()
  r = session.get(&quot;https://www.facebook.com/dialog/oauth?client_id=&lt;client_id&gt;&amp;redirect_uri=https%3A%2F%2F7s.safaricom.co.ke%2Fsu7s%2Fproc%2Ffb-login.php&amp;state=&lt;state&gt;&amp;sdk=php-sdk-3.2.3&amp;display=popup&amp;scope=read_stream%2Cfriends_likes%2Cpublish_actions%2Cuser_friends&quot;,params=payload)
  </code></pre>
  <p>It doesn't log in even with the correct username and password, the same input works if you visit the link with a browser.</p>