// XXX: Do some error handling here
+ $this->setDefaults();
+
$this->showHome($flink, _('You can now use Identi.ca from Facebook!'));
} else {
$this->showLoginForm($msg);
}
- function showHome($flink, $msg)
+ function setDefaults()
{
- $this->show_header('Home');
+ $facebook = get_facebook();
- if ($msg) {
- common_element('fb:success', array('message' => $msg));
- }
+ // 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();
- echo $this->show_notices($user);
+ $notice = $user->getCurrentNotice();
+ update_profile_box($facebook, $fbuid, $user, $notice);
+
+
+ $this->show_header('Home');
- $this->update_profile_box($facebook, $fbuid, $user);
+ if ($msg) {
+ common_element('fb:success', array('message' => $msg));
+ }
+
+ echo $this->show_notices($user);
$this->show_footer();
}