title: Ajax keeps sending null values to the method even tho facebook is giving me the requested data
body: <p>I'm trying to make a login through Facebook, in the console it shows that I'm getting the requested data (email, first_name ...) but ajax keeps sending null data to the PHP method.</p>
  
  <p>here's the ajax code:</p>
  
  <pre><code>function saveUserData() {
              FB.api('/me?fields=id,first_name,last_name,email', function(response){
  
                  $.ajax({
                      url: '&lt;?php echo base_url();?&gt;Auth/fb_auth',
                      data: {response: JSON.stringify(response)},
                      type: 'POST',
                      dataType: 'json',
                      success: function (data) {
  
                          if(data['state'] == 'ok'){
                              window.location.href ="&lt;?php echo base_url(); ?&gt;";
                          }
                      }
                  });
              });
  
          }
  </code></pre>
  
  <p>and this is how I get the data in the method:</p>
  
  <pre><code>$response  = json_decode($this-&gt;input-&gt;post('response'), true);
  </code></pre>