I am building a circuit with the Raspberry Pi that requires a button about fifty feet away from the central circuit. I am planning on using speaker wire for the connection from the Pi to the button. Is this an OK solution? If so, what gauge of wire should I use, or does it matter? If it isn't an OK solution, what should I use instead?
In fact, while this question if not specifically Pi oriented, it is (marginally) relevant to using the GPIO on a long cable.
The wire gauge is irrelevant.
You are in fact connecting an antenna to the GPIO, so you should minimise interference.
Twisted pair is a good idea, but a pair like speaker wire is acceptable.
You should avoid running the wire parallel to any other circuitry.
The most important is to use a low impedance circuit - i.e. a low value Pull up (say 470Ω) near the Pi itself.