I NEED HELP!

Without thinking today I saw an old guy best friend and he yelled that he loved me and I shouted it back so I didn't hurt his feelings but my boyfriend was right there and now he's pissed at me and it seems like there's nothing I can say or do to make it right. What would you girls/guys do?