title: CodeIgniter Rest API + Facebook SDK
body: <p>I use Phil Sturgeon's Rest API (<a href="https://github.com/philsturgeon/codeigniter-restserver" rel="nofollow">https://github.com/philsturgeon/codeigniter-restserver</a>) in my CodeIgniter setup.</p>
  
  <p>My API uses the Facebook SDK to interact with Facebook's Graph API, requesting information about the user, and so on. However, when I make an AJAX call to my API, I get an empty Facebook object as return.</p>
  
  <p>I did some checks and it appears that Facebook's $_REQUEST['code'] and $_REQUEST['state'] (for CSRF protection) are not provided when I make this call via Phil Sturgeon's Rest API.</p>
  
  <p>Any idea how to fix this?</p>
  
  <p>Thanks!</p>