5 include_once getShopBasePath() .
"core/facebook/facebook.php";
17 class oxFb
extends Facebook
25 protected $_blIsConnected = null;
33 public function __construct()
37 $aFbConfig[
"appId"] = $oConfig->getConfigParam(
"sFbAppId");
38 $aFbConfig[
"secret"] = $oConfig->getConfigParam(
"sFbSecretKey");
39 $aFbConfig[
"cookie"] =
true;
41 BaseFacebook::__construct($aFbConfig);
49 public function isConnected()
53 if (!$oConfig->getConfigParam(
"bl_showFbConnect")) {
57 if ($this->_blIsConnected !== null) {
58 return $this->_blIsConnected;
61 $this->_blIsConnected =
false;
62 $oUser = $this->getUser();
65 $this->_blIsConnected =
false;
67 return $this->_blIsConnected;
70 $this->_blIsConnected =
true;
73 }
catch (FacebookApiException $e) {
74 $this->_blIsConnected =
false;
77 return $this->_blIsConnected;
91 protected function setPersistentData($key, $value)
93 if (!in_array($key, self::$kSupportedKeys)) {
94 self::errorLog(
'Unsupported key passed to setPersistentData.');
99 $sSessionVarName = $this->constructSessionVariableName($key);
111 protected function getPersistentData($key, $default =
false)
113 if (!in_array($key, self::$kSupportedKeys)) {
114 self::errorLog(
'Unsupported key passed to getPersistentData.');
119 $sSessionVarName = $this->constructSessionVariableName($key);
132 protected function clearPersistentData($key)
134 if (!in_array($key, self::$kSupportedKeys)) {
135 self::errorLog(
'Unsupported key passed to clearPersistentData.');
140 $sSessionVarName = $this->constructSessionVariableName($key);