Pius XII wrote on communications media of his day with great clarity. Here are a few key points that could easily be applied to the internet; with Catholics taking grave care to act in a manner that is Christian, and not to use the internet in a manner that the "gentiles" do. Far be from Catholics to dig the Church's grave through their misuse of the internet, especially Facebook.
The remarkable progress made by modern technology in the fields of motion pictures, radio, and television [we can here add the internet] have given rise to great benefits, and to just as great dangers. For these new means of communication are within the reach of almost everyone, and thus exercise a powerful influence over men's minds. They can enlighten, ennoble, and adorn men's minds, but they can also disfigure them with dark shadows, disgrace them with perversity, and expose them to unrestrained passions, according as the shows they offer present our senses with objects that are proper or improper.
And so today the mounting technological advances in communicating pictures, sounds, and ideas must be subjected to the sweet yoke of the law of Christ if they are not to become a source of countless evils which will be all the more serious in that they will enslave not only the powers of nature but also those of the soul. In this event, man's inventions would be stripped of that beneficent usefulness which, in God's provident design, is their primary purpose.
We cannot approve the stand of those who claim and defend their freedom to depict and display whatever they please, despite the perfectly evident fact that great harm has come to souls in days past as a result of this attitude. For here the issue is not real freedom, which We have discussed above, but unchecked license to express oneself without regard for prudence, even though this be contrary to sound morals and liable to result in serious danger for souls.
...the primary aim of the internet should serve truth and virtue...[it] should serve the spread of truth so that the bonds between peoples will be made closer, so that men will have better mutual understanding and will assist one another in time of crisis, and, finally so that there will be genuine cooperation between public authority and individual citizens.
To serve truth means more than simply to refrain entirely from falsehood, lies, and deceit; it means shunning everything that can encourage a way of life and action that is false, imperfect, or harmful to others...
But it is not enough that these new inventions serve truth; they must also perfect human life and morals. They can contribute to this end in three ways which We intend to discuss: by announcing the news; by educating; by entertaining.
The full encyclical, Miranda Prorsus, may be read here.