Barton, who is on loan at Marseille from QPR, tweeted yesterday that his French team-mate Remy was close to joining QPR over Newcastle.
Hamann, who played with Barton at Manchester City, took exception to the Englishman discussing personal transfer business on the social networking site.
Barton today apologised, tweeting: "I have no right to question a man I hardly know. I must, therefore apologise for my part in last night's heated exchange.
"I should be wise enough to rise about such trivial things. Have a good day people."