The issue is the mis-characterization of Obama as "very friendly".
The fact that a country signs a treaty with other does not mean that they are "friends" per se. Obama (together with 4 other parties) signed a treaty with Iran to dismantle Iran's nuclear program, and in exchange removed some of the sanctions that the USA and other countries were applying to Iran.
While Obama (and others) defended the treaty (as still do Russia, China, France, the UK, Germany1), that did not mean that he showed any sign of support to Iran's regime.
While the idea that the USA should impose its values in all of the world (by force if necessary) sounds simple, appealing (after all, if we are the best then anything we do is right?) and "ethical"2, the implementation has been found to be "complicated" and overwhelming costly(look at Irak for a recent example).
So, countries sign treaties with countries even if they do not like each other, as a way of achieving their objectives. It does not mean any affection between the two, it is just a recognition that an agreement is preferable to war or to no treaty at all.
For example, almost nobody has objected to the Trump administration engaging in talks with the North Korea regime, which is far worse than Iran. And even during the Cold War, with the USA calling the Soviet Union an "Evil Empire", treaties were held and diplomatic talks did happen.
Of course, that does not mean that engaging with talks with an hostile regime cannot be used as political ammunition about the politicians engaged, either because some people honestly do not like it, or if that serves to become an attack on the politician, even if there is no realistic alternative3. So, the "Obama is friendly towards Iran" claim appears4.
A different issue is that Donald Trump has been criticized for actually praising Kim Jong Un and his regime in repeated occasions. But that is because he has gone far beyond what engaging in diplomatic talks requires, and even that could be "brushed under the rug" in the case that the process ends with a satisfactory treaty.
And, as a side note, if you do think that "respect to the Human Rights" is used as a meaningful guide for USA foreign policy, you really should read a little more.
1In short, the whole world except the Republican Party, Israel and Saudi Arabia.
2Then the old issue appears: what happens if "they" freely decide not to be like the USA?
3And not only in one side; in Iran Conservative politicians did accuse the Iranian representatives who signed the treaty of leaving the country defenseless against ISIS.
4Which gets to work well together with the "Obama is secret Muslim" and other propaganda spread by some conservative sectors.