graulund / tweetnest

NO LONGER MAINTAINED. MESSAGE ME IF YOU WANT TO MAINTAIN THIS. :) A browsable, searchable and easily customizable archive and backup for your tweets
MIT License
492 stars 93 forks source link

Does Tweetnest already support the new 280 characters tweet length? #91

Open RobThree opened 7 years ago

RobThree commented 7 years ago

https://blog.twitter.com/official/en_us/topics/product/2017/tweetingmadeeasier.html

alexmuller commented 7 years ago

It looks to me like the text column of the tn_tweets is set to VARCHAR(510). My MySQL is a little rusty but I think at least the database should be good up to 510 characters. I'm not sure why that number was chosen though.

RobThree commented 7 years ago

Hmmm, my database is varchar(255); maybe an older version. I'll do some deeper digging when I get around to it (also to see what it takes to make Tweetnest support long(er) tweets if not already supported).

sburlot commented 7 years ago

I've made a quick hack to solve this temporarily:

in the loadtweets.php file, line 127, add this line:

$params['tweet_mode'] = 'extended'; (before the $data = $twitterApi->query('statuses/user_timeline', $params); line) so Twitter returns the extended tweets.

That's all.

EDIT: it appears I didnt run the upgrade.php script last time I updated TweetNest. The tweets field is now varchar(510) EDIT2: My tables are prefixed with tn_, so make the changes for your config.

sr4136 commented 6 years ago

Any good suggestions for an easy way to re-import longer tweets that already got truncated?

Albanj commented 6 years ago

I deleted all messages directly in the mysql database between the 280’s Twitter update and the moment when I make the change.

melissamcewen commented 6 years ago

If you are like me and had an outdated version full of ..., you can just delete everything since the change and then load tweets. I tried targeting the character directly but unfortunately it doesn't reload them automatically (it looks for the most recent tweet and if it's there, won't load anymore). I didn't feel like modifying the code so I ran:

DELETE FROM `tn_tweets` WHERE `time` > '1509462910';