protected function _load() { try { $response = $this->client->api('/me', 'GET', array('fields' => 'id,name,first_name,last_name,link,birthday,gender,email,picture.type(large)')); foreach ($response as $key => $value) { $this->{$key} = $value; } } catch (Inchoo_SocialConnect_Facebook_OAuth2_Exception $e) { $this->_onException($e); } catch (Exception $e) { $this->_onException($e); } }
protected function _load() { try { $response = $this->client->api('/me', 'GET', array('fields' => implode(',', $this->params))); foreach ($response as $key => $value) { $this->{$key} = $value; } } catch (Inchoo_SocialConnect_Facebook_OAuth2_Exception $e) { $this->_onException($e); } catch (Exception $e) { $this->_onException($e); } }
protected function _load() { $this->params['fields'] = 'first_name,last_name,email'; try { $response = $this->client->api('/me', 'GET', $this->params); foreach ($response as $key => $value) { $this->{$key} = $value; } } catch (Inchoo_SocialConnect_Facebook_OAuth2_Exception $e) { $this->_onException($e); } catch (Exception $e) { $this->_onException($e); } }