From 6852f37b853ed73375e9baa070b18b6715076a21 Mon Sep 17 00:00:00 2001 From: mitty Date: Sun, 23 Sep 2012 03:40:42 +0000 Subject: [PATCH] * 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 --- Dev/twitter/dump_timeline.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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//; -- 1.7.9.5