Пример #1
0
 function logout()
 {
     $data['heading'] = 'SendSMS2India';
     $ddd = getFbSessions();
     unset($_COOKIE['fbs_114652618609282']);
     if (!$this->db_session->userdata('iffbloggedout')) {
         if (getFbSessions()) {
             if (!getFbUserDetails()) {
                 $_COOKIE['fbs_114652618609282'] = '';
                 unset($_COOKIE['fbs_114652618609282']);
                 $data['sms'] = anchor('sms', 'SMS', array('data-icon' => 'custom'));
                 $data['contacts'] = anchor('contacts', 'Contacts', array('data-icon' => 'custom'));
                 $data['page'] = $this->config->item('FAL_template_dir') . 'template/fbauth/logout';
                 $data['header'] = true;
                 $data['navigation'] = false;
             }
         } else {
             redirect('');
             /*$data['page'] = $this->config->item('FAL_template_dir').'template/home';
             		$data['header'] = false;
             		$data['navigation'] = false;*/
         }
     } else {
         $this->CI->db_session->unset_userdata('iffbloggedout');
     }
     $this->load->vars($data);
     $this->load->view($this->_container);
 }
Пример #2
0
 function fblogout()
 {
     if ($this->CI->db_session) {
         $_username = $this->CI->db_session->userdata('user_name');
         if ($_username != false) {
             // deletes the userdata stored in DB for the user that logged out
             $this->_unset_user($_username);
         }
     }
     // set FLASH MESSAGE
     $msg = $this->CI->lang->line('FAL_logout_message');
     flashMsg($msg);
     $fbLogoutUrl = getFbLogout_Url();
     if (getFbSessions()) {
         redirect($fbLogoutUrl, 'location');
     } else {
         redirect($this->CI->config->item('FAL_logout_success_action'), 'location');
     }
 }
Пример #3
0
if (isset($me)) {
    print_r($me);
}
?>
		please wait
		</div>
		<div id="fb-root"></div>
	<script>
      window.fbAsyncInit = function() {
        FB.init({
          appId   : '<?php 
echo facebook_app_id();
?>
',
          session : <?php 
echo json_encode(getFbSessions());
?>
, // don't refetch the session when PHP already has it
          status  : true, // check login status
          cookie  : true, // enable cookies to allow the server to access the session
          xfbml   : true // parse XFBML
        });

        // whenever the user logs in, we refresh the page
        FB.Event.subscribe('auth.login', function() {
          window.location.reload();
        });
      };

      (function() {
        var e = document.createElement('script');