All that said, TikTok’s critics have yet to offer evidence that Beijing is using TikTok to spread propaganda to young minds, or that it is misusing user data. That may not help its fortunes in the United States: The American government has never offered proof that Huawei’s equipment is a security threat, yet its equipment has been essentially banned from telecommunications networks anyway.

Mr. Zuckerberg, whose company is busily trying to emulate TikTok, argues that the Chinese-owned app represents a competition of values.

“Until recently, the internet in almost every country outside China has been defined by American platforms with strong free expression values. There’s no guarantee these values will win out,” he said in a recent speech at Georgetown University, where he specifically cited TikTok.

Of course, his company once tried to develop software that would allow potential Chinese partners to block content they didn’t like. But the comments strike at a broader truth: To do business on the Chinese internet, any company there has to abide by the government’s wishes, whether it wants to or not.

Bytedance is no different. It was founded in 2012 by Mr. Zhang when he was 29. A geeky programmer, Mr. Zhang says the day in second grade when he received a Tetris hand-held game device was one of the happiest of his life. In college, he was known for his skills in repairing personal computers.

Some people in China compare him to Mr. Zuckerberg. Like the Facebook boss, Mr. Zhang had said machines do a better job than people at distributing content. When Bytedance introduced Toutiao, a news aggregation app that became hugely popular in China, it was run by software instead of an editor in chief. Mostly, it delivered headlines to users based on what they had clicked before.

“I can’t accurately decide whether something is good or bad, highbrow or lowbrow,” Mr. Zhang told a Chinese business magazine in 2016. “I may have my judgment, but I don’t want to impose it on Toutiao.”