diff options
author | luca-marie <ml.kochsiek@fu-berlin.de> | 2016-09-23 15:46:25 +0200 |
---|---|---|
committer | luca-marie <ml.kochsiek@fu-berlin.de> | 2016-09-23 15:46:25 +0200 |
commit | a7ab66b0478c1845ed0fdbff7dd3c83ea804826c (patch) | |
tree | 59c5d1f0e62440a22e90a45fface4e3dfc48b45e /app | |
parent | 4ffa776d2c760618b17bd76a9a023f7fe762babd (diff) |
increase number of fetched tweets to make sure 3 most recent tweets without RTs and @ are displayed
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/twitter_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index 5a9d28c..2312ed9 100644 --- a/app/helpers/twitter_helper.rb +++ b/app/helpers/twitter_helper.rb @@ -22,7 +22,7 @@ module TwitterHelper def update_twitter_info twitter_user_info[0] = Time.now twitter_user_info[1] = twitter_client.user(twitter_handle).name - twitter_user_info[2] = twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false}.take(10) + twitter_user_info[2] = twitter_client.user_timeline(twitter_handle, {:count => 200}).select{ |tweet| tweet.text.start_with?('RT','@')==false}.take(3) if twitter_user_info[2] == nil error_handling twitter_user_info[3] = "The twitter handle does not exist or the account's tweets are protected. Please change the privacy settings accordingly." |