summaryrefslogtreecommitdiff
path: root/actions/facebookhome.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-01-12 05:25:07 +0000
committerZach Copley <zach@controlyourself.ca>2009-01-12 05:25:07 +0000
commit125f05563b5c7bd5b74b1afbea3c0b663795bff5 (patch)
tree0e4fae530a15ecf7a3255b12ffa1d2bceba9db64 /actions/facebookhome.php
parent10e32eca5ca7683dd7ea3746d563727f1923163f (diff)
trac750 Add prefix string option in Facebook app for notice sync
Diffstat (limited to 'actions/facebookhome.php')
-rw-r--r--actions/facebookhome.php20
1 files changed, 15 insertions, 5 deletions
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) {