Barney Frank served as a member of the U.S. House of Representatives from Massachusetts from 1981 to 2013. His new book is “Frank: A Life in Politics From the Great Society to Same-Sex Marriage.”

There has been a dramatic shift in public opinion of same-sex marriage. What do you attribute it to?

Reality. In the early 2000s, the anti-same-sex-marriage people couldn’t say what they really meant, which was, “We don’t like gay and lesbian people, and we hate the idea of two of them being happy.” Which was just based on prejudice. But that wasn’t going to sell. So they invented this argument that it would have negative consequences: “If you let them get married, it will destabilize society.” That was very frustrating; if we couldn’t disprove that, it might sound plausible. That is why the (2004 court) decision in Massachusetts was so critical. Once we actually had same-sex marriage, I was convinced we could show that all these predictions of negative consequences were untrue. And that is what happened. The reality beat the prejudice.

Do you think the media has influenced public opinion?

I think the media on the whole lagged rather than helped. There were some exceptions. Ellen DeGeneres was a thoughtful, responsible person. She helped a great deal. But many of the portrayals were not helpful, and certainly did not cause (the shift). I don’t think Jack in “Will & Grace” in any way increased respect for us. I did not like “Queer Eye for the Straight Guy.” I thought that emphasized stereotypes.

How does the LGBT movement convey the idea that there are still a host of other issues to confront?

The major issue, which has to be done at the federal level: protection against job discrimination. That needs to be resolved. The other is to say that you can’t have a religious exemption from anti-discrimination rules. The business community has essentially told the people who want to mistreat us that it is interfering with their ability to make profits. In America, link up the moral argument with the profit motive, and you have a pretty tough coalition. The likelihood of substantial religious-based loopholes to these laws is very slight. And, very important: You can win your rights legally, as we have seen with African-Americans, but attitudinal prejudice can still be a problem. The next time you have a Democratic House, Senate and president, you will get a good anti-discrimination law protecting people based on sexual orientation and gender identity.

What is the most homophobic moment that you experienced?

It was when Dick Armey, newly elected majority leader when Republicans took over the Congress in 1995, referred to me as Barney Fag. And then tried to say that he didn’t say it. They had him on tape saying it. His fallback was that he was trying to say Frank, but he mispronounced it. At which point my mother agreed to say that in the 59 years during which her name was Elsie Frank, no one had ever called her Elsie Fag.

Could you imagine that happening today?

No. Even then, it was a good sign in that he felt the need to back down. The Republicans are still against us, overwhelmingly, on every substantive issue, but they do understand the need to not look prejudiced. So they come up with “Oh it would be bad for society. It would be bad for marriage.”

Why did marriage become the issue, instead of employment?

We always put employment discrimination first, legislatively. Marriage became an issue because it came up in the courts. To get employment discrimination protection, you need a positive statute. No one claims that there is a constitutional right for a private company not to hire you. Marriage, on the other hand, you can argue is a constitutional right. In 1995, the Hawaiian Supreme Court looked like it was going to authorize same-sex marriage. That gave Bob Dole the idea that he could help his presidential campaign by getting federal legislation against it. So he did DOMA (the Defense of Marriage Act). But in terms of the LGBT community, we continue to fight for an end to employment discrimination.

What can activists do better?

You know who the most successful activists in America are? The people in the National Rifle Assn. You know what they do? They register to vote. They carefully watch the legislation. When a bill comes up, they call and they write and they lobby the members. We can use our rights as citizens. That is the key. Marches and demonstrations are not going to do this. It is getting deeply engaged in the political process. The best form of activism is to say, “I am a citizen of this country, and I am going to vote, and if you don’t support my rights, I will actively work to throw you out of office.”