From a373e6f500e172fed02ea6c892b69af69da4f688 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 11 Jan 2009 08:33:28 +0000 Subject: trac750 Automatically update Identi.ca profile box with user's latest dent --- lib/facebookutil.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'lib/facebookutil.php') diff --git a/lib/facebookutil.php b/lib/facebookutil.php index e844dd09a..2529b8a4b 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -48,4 +48,59 @@ function start_fbml($indent = true) $xw = new XMLWriter(); $xw->openURI('php://output'); $xw->setIndent($indent); -} \ No newline at end of file +} + +function update_profile_box($facebook, $fbuid, $user, $notice) +{ + + // Need to include inline CSS for styling the Profile box + + $style = ''; + + global $xw; + $xw = new XMLWriter(); + $xw->openMemory(); + + $item = new NoticeListItem($notice); + $item->show(); + + $fbml = "$style " . $xw->outputMemory(false) . ""; + $fbml .= "$style " . $xw->outputMemory(false) . ""; + + $fbml_main = "$style " . $xw->outputMemory(false) . ""; + + $facebook->api_client->profile_setFBML(null, $fbuid, $fbml, null, null, $fbml_main); +} -- cgit v1.2.3-54-g00ecf