Staples should be fine, but keep them small. Remember, the parts you are attaching on a frame are rather small. As to the length, a good rule of thumb is twice the thickness of the piece you are attaching. So if you are nailing through a 1/4 inch piece, use 1/2 or 5/8 inch staples as long as they don't come out the other side of the back piece. Maybe use the smaller size since you will be putting another staple in the other side comming back the same way.
When I assamble frames, I use polyurethane glue ( like gorilla glue ) and 5/8 inch brads from a brad nailer. I do wet the pieces first but this is more for the glue than to keep things from splitting. The brad nailer doesn't split things very easily because it injects the fasteners rather than banging them like a hammer does. Hope this is helpful!