The former deputy first minister says she was advised to lie about her opinions on same-sex marriage.