Some photographs on fake accounts are generated by artificial intelligence, The Associated Press reported.

In multiple recent cases, LinkedIn proved to be an effective recruiting tool. A former employee of the C.I.A. and Defense Intelligence Agency, Kevin Patrick Mallory, was sentenced in May to 20 years in prison for spying for China. The relationship began after he replied in February 2017 to a LinkedIn message from a Chinese intelligence agent posing as a think tank representative, the F.B.I. said.

The Justice Department last October charged a Chinese intelligence agent, Yanjun Xu, with economic espionage after he recruited a GE Aviation engineer in a relationship that began on LinkedIn, according to the indictment.

Mr. Evanina, the counterintelligence chief, told Reuters last year that Chinese agents were contacting thousands of people at a time on LinkedIn. “It’s the ultimate playground for collection,” he said.

That level of activity has not dropped, though Mr. Evanina declined to give statistics.

“People in the private sector and academia are also being targeted this way,” he said this month. “Foreign intelligence services are looking for anyone with access to the information they want, whether classified or unclassified, including corporate trade secrets, intellectual property and other research.”

The Chinese Foreign Ministry did not respond to a request for comment.

The former Obama senior foreign policy official, speaking on the condition of anonymity for fear of jeopardizing future interactions related to China, described in interviews a monthslong recruitment effort by someone who appeared to be a Chinese spy.

In May 2017, five months after the official left his government job and just after he made a trip to China, someone called Robinson Zhang reached out via LinkedIn.