Oklahoma was a word Ted used in couple's therapy with his wife. If invoked by one party, it obligated the other to tell the "God's honest truth".
After telling Rebecca about this marital secret, he then used "Oklahoma" on her when she at first claimed to like the way in which they had bonded over personal matters. Once "Oklahoma-ed", she quickly admitted that she in no way enjoyed this newfound intimacy. At all.
Ted claimed that the device "ruined the musical" for him. He told Rebecca that when he heard certain famous tunes from the show, he'd immediately think of Michelle noting that his "constant optimism [was] too much".