From 8dad87ea95275a1fa57424ca537eb25b701e1a2b Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 23 Jan 2009 04:23:44 +0000 Subject: trac750 FB script to update statuses working again with new uiredesign stuff --- lib/facebookaction.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'lib/facebookaction.php') diff --git a/lib/facebookaction.php b/lib/facebookaction.php index dcd4e33d0..528b58154 100644 --- a/lib/facebookaction.php +++ b/lib/facebookaction.php @@ -46,13 +46,37 @@ class FacebookAction extends Action var $app_uri = null; var $app_name = null; + /** + * Constructor + * + * Just wraps the HTMLOutputter constructor. + * + * @param string $output URI to output to, default = stdout + * @param boolean $indent Whether to indent output, default true + * + * @see XMLOutputter::__construct + * @see HTMLOutputter::__construct + */ + function __construct($output='php://output', $indent=true, $facebook=null, $flink=null) + { + parent::__construct($output, $indent); + + $this->facebook = $facebook; + $this->flink = $flink; + + if ($this->flink) { + $this->fbuid = $flink->foreign_id; + $this->user = $flink->getUser(); + } + } + function prepare($argarray) { parent::prepare($argarray); common_debug("Facebookaction::prepare"); - $this->facebook = get_facebook(); + $this->facebook = getFacebook(); $this->fbuid = $this->facebook->require_login(); $this->action = $this->trimmed('action'); -- cgit v1.2.3-54-g00ecf