I’m using Codeigniter with the mvc, and I’m not using querystrings, but I have this api call to facebook, that returns a querystring.
Only thing is that when I get it back with site.com/controller/method?state=supm&code=supm
I get a 310, because I’m not setup to handle querystrings. I can’t change the config[‘uri_protocol’] to ‘PATH_INFO’, because then only my main page will get displayed, and none of the mvc parameteres will get interpreted (for some reason), so how can I make my page not fail, and still get the code and state from facebook?
Use
$this->input->get()(see Input Class), just making sure you haveallow_get_arrayset to TRUE in your config.php file.I believe this item was added in CI 2.0 and is on by default, so it now allows you to access GET data without needing to use
enable_query_strings.