BEIJING—A new battle over censorship is playing out in China, one that underscores the differences in how the world’s two largest economies are dealing with advances in technology that are upending the news business and social media.

In the U.S., disclosures over Facebook Inc.’s privacy lapses led to Chief Executive Mark Zuckerberg testifying on Capitol Hill. In China, concerns over a smartphone app trafficking in off-color jokes led to authorities shutting it down—and an abject apology from the site’s operator.

“This...