A young political operative disparaged Asians on social media — and then landed a job requiring him to solicit their votes for a state Senate candidate, The Post has learned.

“Dear Asians, at least wear name tags or something. Sincerely, the rest of the world,” Danny Randell, 23, posted on Facebook in November 2011.

When a friend replied, “This is how I feel when I walk around Bayside [Queens],” Randell responded with, “Hahaha.”

Two years later, he was at it again, retweeting a bizarre posting that said: “What are Asian people always laughing about. If your so funny why are there more Asian comedians…”

He was hired July 21 as field director for the re-election campaign of state Sen. Toby Ann Stavisky (D-Queens), whose district includes large concentrations of Asian-Americans in Bayside, Elmhurst and Flushing.

Minutes after getting a call from The Post about his online antics, Stavisky fired Randell, a former intern at the Clinton Foundation.

“This campaign will not tolerate any expressions of divisiveness,” said campaign manager Veronica Ng, who described Randell as a junior staff member.

Randell posted some other questionable messages online as well.

In one September 2011 Facebook post, he wrote, “Todays motto: Dead Fishes and Dumb Bitches.”

He also shared pictures of himself shaking hands with former President Bill Clinton on at least three occasions.

And apparently, he’s a big fan of Jeremy Lin, the Asian-American NBA star who captivated the city with the Knicks in 2012.

“Jeremy Lin is an animal, that is all,” Randell wrote in February 2012.

His non-Lin posts drew the ire of Asian-Americans.

“It’s just not excusable to make racist comments like that,” said Margaret Fung, executive director of the Asian-American Legal Defense and Education Fund.

“The text suggests that all Asians look alike, and that’s unacceptable in the context of a political campaign.”

When contacted by The Post, Randell at first declined to explain his posts, but later issued a written apology.

“When I was a teenager, I posted an inappropriate joke on my Facebook page, which the person I am today knows isn’t funny,” he said. “I sincerely apologize for my transgression. I hope not to be judged by my mistakes from the past, but by my actions going forward.”

Stavisky is fighting to keep her seat in a primary battle against S.J. Jung.