Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Import twitter archive #45
Thanks for this @tralafiti!
To anyone importing a Twitter Tweet Archive into an existing Tweet Nest install for the first time, keep in mind that you'll need to clear your database of existing tweets (by running TRUNCATE on
This only happens the first time, as
Since Tweet Nest imports new Tweets automatically (which
@raamdev This means there already were some duplicated tweets in your database which led to
Thanks for the patch; great work, and just what I was looking for.
I found that while the import (into an existing Tweetnest install) worked beautifully, I subsequently didn't get any new tweets grabbed into my database by the normal tweetnest loadtweets.php. Looks like loadtweets.php finds the latest tweet by finding the latest tweetid using ORDER BY id DESC -- so if you import a bunch of older tweets, it gets confused as something that's not your latest tweet ends up with the highest id.
I worked around it by finding my latest tweet and re-inserting it as the latest thing in the database, then deleting the original entry for it, but I'd guess a better way would maybe be using the tweet's time or Twitter's tweetid (which I think is always an incrementing "integer", even though it's actually a string)? to find the latest tweet in loadtweets.php?
referenced this pull request
Jul 2, 2013
Hi! I first started by importing straight from Twitter, but it only grabbed my last 3200 tweets, so I tried to import the missing months from the downloaded tweet archives. When I clicked through to different months, Tweetnest only showed me the same tweets, my latest ones, no matter which month I clicked (although the counts differ per month and appear correct). I TRUNCATEd the approproate tables, and reimported EVERY month's "archive".js file from the very beginning of when I opened my Twitter account. All the counts are correct again, but still, clicking through to every month shows me only the same tweets, my most recent. Any idea what to do? Here's my tweetnest: http://tweets.richardarchambault.ca
Experienced this issue today. Was not upgrading to the latest tweet nest version for about a year.
Had to manually clean up the duplicates in the DB (PhpMyAdmin). Maybe it will be helpful for someone:
select * from tn_tweets where tweetid in(