digitalmethodsinitiative / dmi-tcat

Digital Methods Initiative - Twitter Capture and Analysis Toolset
Apache License 2.0
367 stars 114 forks source link

Update of retweet count #345

Closed bornakke closed 5 years ago

bornakke commented 5 years ago

Hi DMI,

First thank you for developing this nice tool!

We currently working on a project where we are listning on tweets from 100 specific users. For many of the tweets the retweet count however remains zero even though Twitter tells us it has been retweetet more than 50 times. We figure this reflect the retweet count when posted and that the count currently is not updated by TCAT.

Is that correct? And if yes, would a work around be to run the timeline.php script through cron? I know search.php has been built to add to current repository using cron, but it isn't clear if timeline has the same posibility (or if it could be redesigned to work in this way).

All the best Tobias

dentoir commented 5 years ago

Hi @bornakke

That is indeed correct, running timeline.php through cron should be quite simple to add as functionality. However, by default timeline.php stops whenever it encounters an existing tweet in the database. In your case, you'd like to overwrite it. That does require modification of the source code.

Obviously, I'm not sure how big your bin is, but my approach would be to, prior to some point-in-time you'd want to perform an analysis, to relookup all the tweets in the users' bin. You'd export all the unique tweet IDs from your bin and use the lookup.php script to relookup those, for example in another bin. You'd get all the retweet counts for all the tweets since the beginning of your original bin.

bornakke commented 5 years ago

Thank you for your reply. After consideration we decided to place this update in a separate file being run once every day.