Asteroseismic constraints on K giants make it possible to infer radii, masses and ages of tens of thousands of field stars. Tests against independent estimates of these properties are however scarce, especially in the metal-poor regime. Here, we report the detection of solar-like oscillations in 8 stars belonging to the red-giant branch and red-horizontal branch of the globular cluster M4. The detections were made in photometric observations from the K2 Mission during its Campaign 2. Making use of independent constraints on the distance, we estimate masses of the 8 stars by utilising different combinations of seismic and non-seismic inputs. When introducing a correction to the Delta nu scaling relation as suggested by stellar models, for RGB stars we find excellent agreement with the expected masses from isochrone fitting, and with a distance modulus derived using independent methods. The offset with respect to independent masses is lower, or comparable with, the uncertainties on the average RGB mass (4-10%, depending on the combination of constraints used). Our results lend confidence to asteroseismic masses in the metal poor regime. We note that a larger sample will be needed to allow more stringent tests to be made of systematic uncertainties in all the observables (both seismic and non-seismic), and to explore the properties of RHB stars, and of different populations in the cluster.