X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftwitterapi.php;h=b2602e77ca996418b87e628df83281b08c6a2e44;hb=38d70f13865b197e17773ba24d67ea1148c32ab3;hp=79da82a19408ea44a195087faf31dbc6d9ae389e;hpb=ee942a76967e8f7f92c0169c4f7f6a8493454ae3;p=quix0rs-gnu-social.git diff --git a/lib/twitterapi.php b/lib/twitterapi.php index 79da82a194..b2602e77ca 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -265,6 +265,18 @@ class TwitterapiAction extends Action } } */ + + // Tags/Categories + $tag = new Notice_tag(); + $tag->notice_id = $notice->id; + if ($tag->find()) { + $entry['tags']=array(); + while ($tag->fetch()) { + $entry['tags'][]=$tag->tag; + } + } + $tag->free(); + // RSS Item specific $entry['description'] = $entry['content']; $entry['pubDate'] = common_date_rfc2822($notice->created); @@ -442,6 +454,12 @@ class TwitterapiAction extends Action $enclosure = $entry['enclosures'][0]; $this->element('enclosure', array('url'=>$enclosure['url'],'type'=>$enclosure['mimetype'],'length'=>$enclosure['size']), null); } + + if($entry['tags']){ + foreach($entry['tags'] as $tag){ + $this->element('category', null,$tag); + } + } $this->elementEnd('item'); }