In a blog post, Twitter explained that if you clicked or viewed an ad for a third-party mobile app since May 2018, it may have shared info like your country code and when you engaged with the ad. And since September 2018, it may have shown you ads based on inferences it made about the device you use. That data stayed within Twitter, and both glitches were fixed on August 5th. Though, the company says it is still determining who may have been impacted.
Tech companies, most notably Facebook, have come under fire for sharing user data. While Twitter has avoided most of the criticism, this isn't the first issue it's run into. In May, a bug caused it to accidentally store and share some iOS location data, and it once sold data access to a researcher from Global Science Research (GSR), the company that harvested Facebook data and shared it with Cambridge Analytica. The data revealed this time may not be too damaging, but it's definitely not a good look for Twitter.
Update 8/7/2019 2:15PM ET: This story previously said Twitter may have shared info when users clicked on mobile ads. It's been corrected to state that data was shared when users clicked on ads for third-party mobile apps.