SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Valen
#198627
Pull-up or pull-down resistors as with pretty much any switch connected to digital ports. But maybe the RPi has internal PU/PD resistors. Without those resistors the pin configured as input the input may be floating and give erroneous switch states. Also a series resistor to the pin might be wise to use. Incase you accidentally configure a pin as output and have the switch connected to the opposite voltage. A short will develop then which the series resistor would limit the current of. And switch de-bounce capacitors perhaps. But that can also be solved in software in many cases.

The switch datasheet gives the maximum ratings. (which the raspberry pi won't come close to if properly configured)

Also read:
https://learn.sparkfun.com/tutorials/switch-basics
https://learn.sparkfun.com/tutorials/pull-up-resistors