Well, none of my same-sex friends are into guys or my type, so I'd assume it's a joke. If they're being serious, I'd just turn them down and not make a big deal out of it. I only hang out with easy going people, so I can't imagine it being a serious issue.
As for the other way around, I've been dumb enough to do this. It was my teenage years, which isn't a proper excuse, but something of a defence. Didn't matter much, because I knew his family was moving to another country at the end of the schoolyear. So about a month before, I bought him a rose and told him I'd had a crush on him for about a year and a half. Didn't expect it to end well, but he just said "Thank you. That's very flattering" and that was the end of it. I thought that was a good response.