The Wrexham goalkeeper started for the World XI at Soccer Aid against England at Old Trafford on Sunday night - which his side wom 4-2.
And midway through the match, he tuned into an interview with commentary team Sam Matterface and Iain Stirling.
But as he was talking to the two, the ball was floated into the box with actor Dyer hanging around trying to get on the end of it.
However, the ball eluded the 45-year-old Eastenders icon - and Foster could not resist a cheeky jibe.
He shouted in his face: "Ah, have that Danny Dyer you ain't getting none of this!"
READ MORE ON SOCCER AID
Manchester United fan Beck wowed Beckham and idolises Ronaldo, now returns to Soccer Aid
Danny Dyer scores stunning volley in Soccer Aid training as fans poke fun at Simon Jordan
In the moments before, Foster admitted he was worried about Jermain Defoe because "he always scores against me".
And he also mentioned how there was "a bit of needle" between Noah Beck and Tom Grennan after some crunching tackles in midfield.
Fans absolutely loved the mini-interview before it was cut short, with one saying: "Really enjoyed the first half of soccer aid - Ben Foster live comms giving Danny Dyer verbal was class."
And another wrote: "Lmao they got a mic on Ben foster whilst he's playing and I'm creasing he's said Danny Dyer try againnnnnnn."
Most read in Football
Man United transfer news LIVE: Maguire wants to stay, Greenwood loan eyed, Kane latest
Grealish seen in full kit at 7.30am as Man City stars refuse to end Champions League party
Newcastle given Maguire ultimatum by Man United despite different Aston Villa stance
Arsenal fans fume at Zinchenko message to Man City after treble win
A third posted: "'Danny Dyer, you ain't getting none of this' I love Ben Foster."
Even talkSPORT's very own Mark Goldbridge got involved, saying: "Ben Foster miked up and talking while the game is in lol! Shows how s*** England are."
It came at a desperate time for England, who found themselves 1-0 down to an Usain Bolt strike earlier in the contest.
Actor Asa Butterfield then equalised for England just after the break, before Paul Scholes rolled back the years with a fine strike from distance.
Robbie Keane then levelled up the scoring with a fine curler, before he then put the World XI back in front.
And Kem Cetinay then put the icing on the cake for the World XI as he brought up his fifth goal in Soccer Aid.