FILE PHOTO: Facebook CEO Mark Zuckerberg in San Jose on April 18, 2017. (Stephen Lam/Reuters)

BEFORE RUSHING to judgment on the latest surge of disclosures about Facebook data and how it was used by Cambridge Analytica, everyone should take a deep breath. The very essence of Facebook and social media is to share information, to entertain and enlighten users, and to sustain a business model that has transformed marketing, advertising and news. Those who enter the ecosystem of social networking should not suddenly be shocked that information is being shared. What they should want is transparency and a robust digital world that does not become a hidden surveillance state.

A key question is: Who owns personal information? Facebook allowed an outside researcher in 2013 to develop an app on the platform that paid users a small sum to answer questions and download the app, which then harvested private information from their profiles and their friends. Facebook permitted such data mining at the time. It is doubtful many users knew what was happening or read the fine print. The researcher, Aleksandr Kogan of Cambridge University, then provided the data — on some 50 million people — to Cambridge Analytica, a private firm founded by Stephen K. Bannon, the conservative political operative; and Robert Mercer, the wealthy financier; and another firm.

This transfer of data to a third party broke Facebook’s internal policies. In 2015, Facebook found out, removed the app and demanded the data be destroyed. Apparently, it was not, and may have been exploited to help Donald Trump’s 2016 campaign, including tests of anti-establishment messages such as “deep state” and “drain the swamp.” The transfer may also have violated Facebook assurances about user privacy to the Federal Trade Commission in a 2011 settlement.

Facebook founder Mark Zuckerberg responded Wednesday with an admission of “a breach of trust” and a promise of tighter controls. Further examination of how this happened should come from Facebook, Congress and the FTC. However, users must be realistic. Social media platforms are in business to share. Anyone who spends time browsing online will soon discover hidden sinews that connect each click. Consumers benefit when they get recommendations for a product “we thought you might like.” But at the same time, no one wants a nightmarish surveillance state like that under construction in China, where every citizen is being assigned a “social credit” score. The trick is to find the right path.

Facebook and others are under enormous pressure to behave more as publishers responsible for their content than as neutral platforms. They should not resist. Facebook faces a related set of questions about manipulation of the platform in the 2016 campaign. It is plausible that some were moved to vote for Mr. Trump by postings or ads based on the data Mr. Kogan gave Cambridge Analytica. That is a story that needs to be thoroughly aired, while bearing in mind that Democrats Barack Obama and Hillary Clinton also harnessed big data in their campaigns.

All of this should be pursued in the spirit of perfecting rules of the road to keep social networks free and open. In the end, they should remain what they are, great sharing machines.