I used to work at a company that started out without any software patents, and at some point management decided to encourage the engineers to help generate some. I politely informed my manager that I wouldn't be participating, a few others did the same, and as far as I know none of us were penalized. Sometimes it's possible to just say "I'd really rather not" and have that be the end of it.
I realize I'm speaking from a position of privilege, in that I have only myself to support and I live in an area full of employment opportunities. But I do think it's valid to encourage people to put some thought into the outcomes of their actions in this area.
Regarding another comment in this thread about Facebook's patent attitude being purely defensive: that may be the case now, and I do believe it is, but in five years, who knows who'll be running the company?