+
+ // Allow the id and key to be passed in
+ // Control panel will override
+
+ if (isset($this->appId)) {
+ $appId = common_config('facebook', 'appid');
+ if (empty($appId)) {
+ Config::save(
+ 'facebook',
+ 'appid',
+ $this->appId
+ );
+ }
+ }
+
+ if (isset($this->secret)) {
+ $secret = common_config('facebook', 'secret');
+ if (empty($secret)) {
+ Config::save('facebook', 'secret', $this->secret);
+ }
+ }
+