I used a Craftsman staple gun not a desk stapler. I found it on hubby's workbench and it's one of my favorite tools. I have recovered my sewing chair many times, just staple new fabric around the seat.
The gun is very powerful, the staples will go through the foam board right into the wall.