You should not need a resistor, however if you want to be safe then 100R is enough to protect your pin without beeping so much that it would stop it working.
You should not need a resistor, however if you want to be safe then 100R is enough to protect your pin without beeping so much that it would stop it working.