Facebook\Exception\SDKException

Required "app_id" key not supplied in config and could not find fallback environment variable "FACEBOOK_APP_ID"

/home/httpd/vhosts/marketing-boerse.de/20240318-153510/protected/vendors/facebook/src/Facebook.php(123)

111     {
112         $config = array_merge([
113             'app_id' => getenv(static::APP_ID_ENV_NAME),
114             'app_secret' => getenv(static::APP_SECRET_ENV_NAME),
115             'default_graph_version' => null,
116             'enable_beta_mode' => false,
117             'http_client' => null,
118             'persistent_data_handler' => null,
119             'url_detection_handler' => null,
120         ], $config);
121 
122         if (!$config['app_id']) {
123             throw new SDKException('Required "app_id" key not supplied in config and could not find fallback environment variable "' . static::APP_ID_ENV_NAME . '"');
124         }
125         if (!$config['app_secret']) {
126             throw new SDKException('Required "app_secret" key not supplied in config and could not find fallback environment variable "' . static::APP_SECRET_ENV_NAME . '"');
127         }
128         if ($config['http_client'] !== null && !$config['http_client'] instanceof HttpClient) {
129             throw new \InvalidArgumentException('Required "http_client" key to be null or an instance of \Http\Client\HttpClient');
130         }
131         if (!$config['default_graph_version']) {
132             throw new \InvalidArgumentException('Required "default_graph_version" key not supplied in config');
133         }
134 
135         $this->app = new Application($config['app_id'], $config['app_secret']);

Stack Trace

#0
+
 /home/httpd/vhosts/marketing-boerse.de/20240318-153510/protected/components/OauthWidget.php(26): Facebook\Facebook->__construct()
21         if (!empty($this->redirect)) {
22             setcookie('redirectTo', $this->redirect, time()+600, '/');
23         }
24         
25         $config = HelperClass::getFacebookConfig();
26         $fb = new \Facebook\Facebook($config);
27 
28         $helper = $fb->getRedirectLoginHelper();
29 
30         $permissions = ['email']; // Optional permissions
31         $fbloginURL = $helper->getLoginUrl($config['redirect_url'], $permissions);
#2
+
 /home/httpd/vhosts/marketing-boerse.de/20240318-153510/protected/vendors/Smarty/plugins/function.widget.php(34): CBaseController->widget()
29     if (isset($params['_name'])) {
30         $params['name'] = $params['_name'];
31         unset($params['_name']);
32     }
33     
34     return $controller_object->widget($widgetName, $params, true);
35 }
#3
+
 /home/httpd/vhosts/marketing-boerse.de/20240318-153510/protected/runtime/smarty/compiled/b3487f90549b117d4f13b74b00d132e078d22654.file.details.tpl.php(59): smarty_function_widget()
54                     <?php }?>
55                 </h2>
56                 <?php }else{ ?>
57                     <h2><?php echo smarty_function_t(array('cat'=>"download",'text'=>'To download the report please.'),$_smarty_tpl);?>
58 </h2>
59                     <?php echo smarty_function_widget(array('name'=>'OauthWidget','redirect'=>((string)$_smarty_tpl->tpl_vars['this']->value->createAbsoluteUrl(((string)$_smarty_tpl->tpl_vars['this']->value->Id)."/download",array("clink"=>$_smarty_tpl->tpl_vars['model']->value->cLink,"cid"=>$_smarty_tpl->tpl_vars['model']->value->cID)))),$_smarty_tpl);?>
60 
61                 <?php }?>
62                 </div>
63             </div>
64         </div>
2024-03-28 09:39:13 nginx/1.18.0 Yii Framework/1.1.29