/** from codezone4.wordpress.com 
         url =>https://codezone4.wordpress.com/2013/05/19/codeigniter-facebook-login-tutorial-using-facebook-php-sdk/
     **/
 function fbtest()
 {
     $facebook = new Facebook(array('app_id' => '1545133145805354', 'app_secret' => 'e2f35895f03c06a6a757ff30f267dc43', 'default_graph_version' => 'v2.3'));
     // Choose your app context helper
     $helper = $facebook->getCanvasHelper();
     //$helper = $fb->getPageTabHelper();
     //$helper = $fb->getJavaScriptHelper();
     $signed_in = $helper->getSignedRequest();
     // Get the user ID if signed request exists
     $user = $signed_in ? $signed_in->getUserId() : null;
     print_r($signed_in);
 }