From 125f05563b5c7bd5b74b1afbea3c0b663795bff5 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 12 Jan 2009 05:25:07 +0000 Subject: trac750 Add prefix string option in Facebook app for notice sync --- actions/facebookhome.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'actions/facebookhome.php') diff --git a/actions/facebookhome.php b/actions/facebookhome.php index bbef447cd..f72f08a34 100644 --- a/actions/facebookhome.php +++ b/actions/facebookhome.php @@ -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,18 +82,26 @@ 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) { -- cgit v1.2.3-54-g00ecf