From c998c7c60180cecbb55435629307de6f00bd637b Mon Sep 17 00:00:00 2001 From: zach Date: Wed, 16 Jul 2008 15:18:47 -0400 Subject: Twitter-compatible API: public_timeline.rss really works now darcs-hash:20080716191847-ca946-9a75dd3aa07974408b269b31d1de3e49c5ae2a72.gz --- actions/twitapistatuses.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index d1f957942..3a495a129 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -70,25 +70,26 @@ class TwitapistatusesAction extends TwitterapiAction { common_end_xml(); } elseif ($apidata['content-type'] == 'rss') { - - //header('Content-Type: application/xml; charset=utf-8'); header("Content-Type: application/rss+xml; charset=utf-8"); $this->init_twitter_rss(); + $sitename = common_config('site', 'name'); + $siteserver = common_config('site', 'server'); + common_element_start('channel'); - common_element('title', NULL, 'Identi.ca public timeline'); - common_element('link', NULL, 'http://www.identi.ca'); - common_element('description', NULL, 'Identi.ca updates from everyone!'); + common_element('title', NULL, "$sitename public timeline"); + common_element('link', NULL, "http://$siteserver"); + common_element('description', NULL, "$sitename updates from everyone!"); common_element('language', NULL, 'en-us'); - common_element('ttl', NULL, '40'); // 40 what? + common_element('ttl', NULL, '40'); if ($cnt > 0) { for ($i = 0; $i < 20; $i++) { if ($notice->fetch()) { - $twitter_status = $this->twitter_status_array($notice); - $this->show_twitter_rss_item($twitter_status); + $entry = $this->twitter_rss_entry_array($notice); + $this->show_twitter_rss_item($entry); } else { // shouldn't happen! break; -- cgit v1.2.3-54-g00ecf