Accoring to the report it was a setup--the pages suckered Foley into writing the salacious IMs; thus he couldn't deny that he'd written them.
Foley couldn't help his gay self and walked right into it but the fact the former page was 18 at the time means Foley didn't do anything illegal but the former page may have.