Guest User

Untitled

a guest
Jan 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. class Site extends CI_Controller {
  2.  
  3. function __construct() {
  4. parent::__construct();
  5. $this->load->model('entry_model');
  6. $this->load->model('facebook_model');
  7. $this->facebook_model->get_user();
  8. }
  9.  
  10. function index() {
  11.  
  12. $fb_uid = $this->session->userdata('fb_uid'); // this is a string that contains the FB user ID
  13. $fb_me = $this->session->userdata('fb_me'); // this is an array that contains the requested user data
  14.  
  15. $data = array(
  16. 'fb_me' => $fb_me,
  17. 'fb_uid' => $fb_uid,
  18. //'access_token' => $this->facebook->getAccessToken()
  19. );
  20.  
  21.  
  22. # output home page
  23. $data['main_content'] = 'home';
  24. $this->load->view('template', $data);
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment