I'm not sure how much insight these others have, but I've been breeding bettas for quite some time now. It doesn't sound like you are leaving them together for long enough. Or they just may not be ready. Feed them live foods morning at night. Black worms will condition them every time. You say they just swam with each other, which is what most pairs do prior to spawning.
Make sure your fish are good and ready. Both the male and female. Make sure your water is very clean and chlorine free and add some Indian almond leaves. When both are ready you can tell. The female will flush..if she swims as usual, she's not ready. the male will dance around and flare, more of a showy dance than an aggressive one.
Introduce the female in a floated clear container in the breeding tank containing the male. Do this at say 12 noon or shortly there after and leave them. Make sure the breeding tank is in a quiet location. At nightfall, if BOTH male and female are still interested in each other, release the female, turn off the lights and let them be. They should spawn by the next morning if they are not bothered. But your fish need to be ready to breed. Bettas tend to breed better right before a storm or when the barometric pressure is high. If possible, save your fish and time and plan a spawning for a stormy time.
Just a few other things, the male tends to the eggs and fry till they just become free swimming. There is a possibility that he may eat his first batch or so if he is young. Don't expect your bettas to be pretty when they are done spawning. They are aggressive breeders and will nip each other. This is why show bettas are no longer shown after they are spawned. Spawning should only be preformed to further genetically superior stock.
Oh and make sure you have weeks of supplies to hatch baby brine shrimp and raise other live foods.