Prior, dropped after the third test of the recent 5-0 Ashes rout by Australia due to poor form, told a Q&A session at a cricketing event in Dubai on Thursday that Pietersen's sacking by England this month would make the dressing room a better place.
Pietersen responded by writing on his Twitter feed: "Fewer Q&As, more Sussex nets methinks", referring to the wicketkeeper-batsman's county team.
Swann, who announced his sudden retirement from all forms of cricket midway through the Ashes series that ended last month, criticised both of his former colleagues.
"It's another disappointing episode," he said on BBC radio while commentating on England's 15-run defeat by West Indies in Antigua on Friday, the opening game in a three-match series of one-day internationals.
"Matt's been a bit naive and Kev's come back in a childish way. Gone are the days of phoning someone up and thrashing it out, it involves a million people on Twitter these days.
"I'm sure Kev's still got Matt's number and could have phoned him up."
When Pietersen was briefly dropped in 2012 following media reports he had sent "provocative" text messages about England players to members of the South Africa squad during a series involving both teams, Prior was instrumental in his subsequent reintegration.
Swann said something occurred in Australia to change the relationship between Prior and Pietersen.
"I still don't know what exactly happened but I've been assured by the one or two friends I still have in the team that things did happen," said the former spinner. "I'm as intrigued as anyone because Matt was one of Kev's biggest allies.
"Matt was one of the reasons why Kev was reintegrated back into the team when a lot of players, myself included, were thinking there's no way he should play again.
"But guys like (captain) Alastair Cook and Matt Prior talked us round. They said Kevin can change and he did for the 18 months or so that I was involved," said Swann.
- Sports & Recreation