The Duke of Cambridge met Northern Ireland footballer Chris Brunt as he addressed an event to discuss racism's impact on players' mental health.
William - a keen Aston Villa fan - was teased about how Brunt had played well against his favourite side in the past.
Meeting West Bromwich Albion players yesterday as part of the Heads Up campaign, William also raised the effects of social media criticism on players.
The issue of racism in football has come to the fore after recent incidents in both the international and domestic game.
Bulgaria were sanctioned by Uefa after their fans' racist abuse of England players in a Euro 2020 qualifier in October.
Last month, an FA Cup qualifier had to be abandoned after Haringey Borough and Yeovil Town players walked off in the 64th minute, when racist abuse was hurled at Haringey players.
This week, Liverpool and Netherlands midfielder Georginio Wijnaldum said he would walk off the pitch if racially abused.
William raised the topic while speaking to West Brom's first team, who are top of the Championship.
Greeting the Duke, there was good-humoured leg-pulling by club chief executive, Mark Jenkins, who told how club captain Brunt had "played well against Villa" in the past.
Brunt, who has played more than 400 games for the Baggies, replied: "I wasn't going to mention that."
Brunt won 65 international caps for Northern Ireland and scored three goals after making his debut against Switzerland in 2004.
He missed out on the Euro 2016 finals due to a serious knee injury.
In a 90-minute visit to the club's training ground in Walsall, West Midlands, the duke also met West Brom head coach, Slaven Bilic, and other first-team players.
Out on the training pitch, Gareth Barry told the prince players had become "more aware" of how to better handle mental health, while midfielder Jake Livermore said "it's definitely going in the right direction".
England international Livermore, who has become an Albion regular since arriving from Hull City in 2017, lost his newborn son in 2014.
Talking to the No 8 and other players about mental health awareness, the duke said: "The stats are bad about men and mental health, really bad.
"Girls are pretty good, but guys are really bad at talking about it."
He added: "It's also not just about the footballing community, but about guys who are out there watching... trying to get guys to be a bit more open about it."
The duke then asked: "Do things like social media criticism - does that bother you, does that get to you guys?"
Bilic said: "It's like what you say, you want to be a macho man, 'It doesn't affect me' - it does, it does."
William, as president of the Football Association, is spear-heading the Heads Up campaign, which is using the popularity of football to get across the importance of mental health, particularly among men young and old.