President Obama said personal relationships can help in legislating, but can only take you so far.

Both parties have to be invested in getting things done, Obama told David Remnick of The New Yorker magazine.

"There's no doubt that personal relationships matter at the margins and can tip something over the finish line if things are aligned to get — if things are aligned for legislation to happen," Obama said.

Obama, who has been criticized for not developing better personal relationships with congressional Republicans (and Democrats), used the example of GOP President Ronald Reagan, Democratic House Speaker Tip O'Neill, and the Social Security agreement of 1983.

"I have no doubt that Ronald Reagan's relationship with Tip O'Neill helped to facilitate the Social Security deal getting done," Obama said.

But, he added: "Had Tip O'Neill not seen it to be in his interests to do a deal with Ronald Reagan because he had a whole bunch of conservative and Southern Democrats whose districts had been won by Reagan — and had Reagan not been looking at polls from his advisers telling him that Social Security was a very popular program and that he couldn't be seen as antagonistic toward it — it wouldn't have mattered how many drinks Reagan and Tip O'Neill had together."

The New Yorker posted these and other comments as an addendum to Remnick's long (and worthwhile) profile of Obama.

"The interesting thing is that, when I was in the state legislature, I had great relationships with my Republican colleagues. And we had poker games and we had golf outings — so much so that I ended up having a number of Republicans say nice things about me when I ran for president. It came back to haunt them later."

In Washington, however, Obama said his message hasn't been able to reach a core group of Republicans, in part because of what he described as distortions from the conservative media.

Said Obama: "Another way of putting it, I guess, is that the issue has been the inability of my message to penetrate the Republican base so that they feel persuaded that I'm not the caricature that you see on Fox News or Rush Limbaugh, but I'm somebody who is interested in solving problems and is pretty practical, and that, actually, a lot of the things that we've put in place worked better than people might think.

"And as long as there's that gap between perceptions of me within the average Republican primary voter and the reality, it's hard for folks like John Boehner to move too far in my direction."