James Franco appeared on “Live! With Kelly and Michael” on Friday and admitted to flirting with a 17-year-old girl, saying he was “embarrassed” by the incident.

The 35-year-old actor addressed the leaked Instagram and text messages that were posted online on Wednesday by the girl and screengrabbed by various news outlets even though she deleted them.

"I didn't want to come on the show and...feel awkward, so uh, yeah. I mean I guess, you know, I'm embarrassed, and I guess I'm just a model of, you know, how social media is tricky," he said, according to E! News. "It's a way people meet each other today. But what I've learned I guess just because I'm new to it is like, you don't know who's on the other end. You meet somebody in person and you get a feel for them but you don't know who you're talking to, and, you know? So I used bad judgment. I learned my lesson."

The messages showed Franco trying to arrange a meet up with the girl at a hotel in New York City even after she told him she was not yet 18 years old. He sent her several pictures of himself to prove he was the one she was speaking with.

"Unfortunately in my position, I mean...I have a very good life, but not only do I have to go through the embarrassing kind of rituals of kind of meeting someone, sometimes if I do that then it gets, you know, published for the world so now, you know, it's like doubly embarrassing," Franco said.

More On This...

The age of consent is 17 in New York, but while Franco did nothing illegal, some fans were still creeped out by his actions.

He initially addressed the scandal on Wednesday tweeting, “I HOPE PARENTS KEEP THEIR TEENS AWAY FROM ME. Thank you.”

Kelly Ripa and Michael Strahan praised the star for addressing responding to his critics and addressing the scandal head on.

“I always think honesty and not avoiding anything is always the best policy and I appreciate that,” Strahan said.