This isn't mean to sound rude or anything along those lines, but I don't think that the country is ready yet to elect a gay person.
That already happened in 2008 with Obama, who is thoroughly gay (although not officially).
That sounds like something people who don't like Obama made up, which is pretty messed up on multiple levels. It's pretty accepted among historians that James Buchanan was gay though. That was before the civil war though, so doesn't really change what squatz said.
How do we know Buchanan and King were a couple? In 1844, after King assumed his posting in Paris, Buchanan wrote a letter to a friend, complaining about being alone and not being able to find the right gentleman partner:
I am now solitary and alone, having no companion in the house with me. I have gone a wooing to several gentlemen, but have not succeeded with any one of them. I feel that it is not good for man to be alone; and should not be astonished to find myself married to some old maid who can nurse me when I am sick, provide good dinners for me when I am well, and not expect from me any very ardent or romantic affection.
Their peers knew about their relationship, which Buchanan and King made no real effort to hide. Andrew Jackson referred to King as Miss Nancy a euphemism for a gay man.
Other contemporaries called King Buchanans better half, and one congressman referred to him as Mrs. B. All this would be quite peculiar if Buchanan was not gay. And we are not likely to get more explicit acknowledgment because both Buchanan and King had their personal papers burned after death.
https://www.washingtonpost.com/opinions/pete-buttigieg-wouldnt-be-americas-first-gay-president/2019/03/26/0b7b1eb4-41de-11e9-922c-64d6b7840b82_story.html