$twitter_status['truncated'] = 'false'; # Not possible on Laconica
$twitter_status['created_at'] = $this->date_twitter($notice->created);
$twitter_status['in_reply_to_status_id'] = ($notice->reply_to) ? intval($notice->reply_to) : NULL;
- $twitter_status['source'] = NULL; # XXX: twitterific, twitterfox, etc. Not supported yet.
+ $twitter_status['source'] = $notice->source;
$twitter_status['id'] = intval($notice->id);
$twitter_status['in_reply_to_user_id'] = ($notice->reply_to) ? $this->replier_by_reply(intval($notice->reply_to)) : NULL;
$twitter_status['favorited'] = NULL; # XXX: Not implemented on Laconica yet.
function show_twitter_json_users($twitter_users) {
print(json_encode($twitter_users));
}
-
- function show($args, $apidata) {
- parent::handle($args);
-
- $id = $apidata['api_arg'];
- $notice = Notice::staticGet($id);
-
- if ($notice) {
-
- if ($apidata['content-type'] == 'xml') {
- $this->show_single_xml_status($notice);
- } elseif ($apidata['content-type'] == 'json') {
- $this->show_single_json_status($notice);
- }
- } else {
- header('HTTP/1.1 404 Not Found');
- }
-
- exit();
- }
function show_single_xml_status($notice) {
$this->init_document('xml');
$this->init_twitter_atom();
break;
default:
- $this->client_error(_('Unsupported type'));
+ $this->client_error(_('Not a supported data format.'));
break;
}
$this->end_twitter_rss();
break;
default:
- $this->client_error(_('Unsupported type'));
+ $this->client_error(_('Not a supported data format.'));
break;
}
return;
$this->show_twitter_json_users($profile_array);
break;
default:
- $this->client_error(_('not a supported data format'));
+ $this->client_error(_('Not a supported data format.'));
return;
}
return;