Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. private function load_facebook_info()
  2. {
  3. $this->init_facebook();
  4. $this->init_session();
  5. if (array_key_exists('session_key',$_SESSION)) {
  6. $this->fb_sig_session_key = $_SESSION['session_key'];
  7. $this->facebook->api_client->session_key = $this->fb_sig_session_key;
  8. }
  9. $info = $this->facebook->api_client->users_getInfo(array($this->facebook_uid), 'first_name,last_name,pic_square');
  10. if (empty($info))
  11. throw new Exception("Invalid Facebook ID: " . $this->facebook_uid);
  12. $this->first_name = $info[0]['first_name'];
  13. $this->last_name = $info[0]['last_name'];
  14. $this->image_url = $info[0]['pic_square'];
  15. }
Add Comment
Please, Sign In to add comment