Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function load_facebook_info()
- {
- $this->init_facebook();
- $this->init_session();
- if (array_key_exists('session_key',$_SESSION)) {
- $this->fb_sig_session_key = $_SESSION['session_key'];
- $this->facebook->api_client->session_key = $this->fb_sig_session_key;
- }
- $info = $this->facebook->api_client->users_getInfo(array($this->facebook_uid), 'first_name,last_name,pic_square');
- if (empty($info))
- throw new Exception("Invalid Facebook ID: " . $this->facebook_uid);
- $this->first_name = $info[0]['first_name'];
- $this->last_name = $info[0]['last_name'];
- $this->image_url = $info[0]['pic_square'];
- }
Add Comment
Please, Sign In to add comment