From: mitty Date: Sun, 23 Sep 2012 03:40:42 +0000 (+0000) Subject: * fix search query does not return user/screen_name and user/name X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=6852f37b853ed73375e9baa070b18b6715076a21;p=lab.git * fix search query does not return user/screen_name and user/name * use from_user and from_user_name instead git-svn-id: https://lab.mitty.jp/svn/lab/trunk@165 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/Dev/twitter/dump_timeline.pl b/Dev/twitter/dump_timeline.pl index 0564d5d..e800ac7 100755 --- a/Dev/twitter/dump_timeline.pl +++ b/Dev/twitter/dump_timeline.pl @@ -98,8 +98,11 @@ eval { foreach my $status (@{$res}) { my $text = ""; $text .= "(". $status->{id} . ") "; - $text .= $status->{user}{screen_name} . "|"; - $text .= $status->{user}{name}; + $text .= ($status->{user}{screen_name}) ? + $status->{user}{screen_name} : $status->{from_user}; + $text .= "|"; + $text .= ($status->{user}{name}) ? + $status->{user}{name} : $status->{from_user_name}; $text .= " [" . $status->{created_at} . "]"; $text .= " ". $status->{text}; $text =~ s/\n//;