]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/facebookhome.php
More space for the counter
[quix0rs-gnu-social.git] / actions / facebookhome.php
index bbef447cdb6f0abc6873bb63c2c2024b44fd1712..d2ac7617d1c76d0848bb4df0ab9e17c66a835781 100644 (file)
@@ -70,6 +70,8 @@ class FacebookhomeAction extends FacebookAction
 
                 // XXX: Do some error handling here
 
+                $this->setDefaults();
+
                 $this->showHome($flink, _('You can now use Identi.ca from Facebook!'));
 
             } else {
@@ -80,22 +82,30 @@ class FacebookhomeAction extends FacebookAction
         $this->showLoginForm($msg);
     }
 
+    function setDefaults()
+    {
+        $facebook = get_facebook();
+
+        // A default prefix string for notices
+        $facebook->api_client->data_setUserPreference(1, 'dented: ');
+    }
+
     function showHome($flink, $msg)
     {
-        
+
         $facebook = get_facebook();
         $fbuid = $facebook->require_login();
-        
+
         $user = $flink->getUser();
-        
+
         $notice = $user->getCurrentNotice();
         update_profile_box($facebook, $fbuid, $user, $notice);
-        
-        
+
+
         $this->show_header('Home');
 
         if ($msg) {
-            common_element('fb:success', array('message' => $msg));
+            $this->element('fb:success', array('message' => $msg));
         }
 
         echo $this->show_notices($user);