Facebook PHP-SDK with CodeIgniter not returning $_REQUEST['signed_request']

后端 未结 3 1035
北恋
北恋 2021-01-06 05:52
class Example extends CI_Controller {

    function __construct()
    {
        parent::__construct();
    }

    function index()
    {

        $this->load->         


        
3条回答
  •  感情败类
    2021-01-06 06:37

    According to one of the answers in this post, CodeIgniter purges the $_REQUEST variable for security reasons. I assume it's related to the automatic input filtering described in the Codeigniter Manual here, but it's not specifically mentioned there either though. I am unsure whether setting

     $config['global_xss_filtering'] = TRUE;
    

    in config.php affects it or not (I have it set to TRUE in mine), but at least now you/we know why the $_REQUEST variable is not available.

    Interestingly, I have the FB SDK library in my CIApplication/libraries/ folder and it seems to access the $_REQUEST variable fine, just not in my views or controllers.

    Was looking for the answer to the same question when I came across this post - and yours is a perfectly valid, good question too!

    Cheers Matt

提交回复
热议问题