Is it generally used as sarcasm?
Yes, it's generally used as sarcasm.
A: "Would you like a donut?". B: "No thanks, they make me fart". A:"Errrr, thanks for sharing".
A: "How was your honeymoon in Hawaii?". B: "Awesome, although it's not like we ever left the room, heh heh". A: "Thanks for sharing".
It's generally in response to "oversharing", TMI type of thing.