All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
What you mentioned, that your husband "liked" that comment/post on Facebook is not enough as evidence that he masturbates. If you do not have decisive proof that he does that, then the basic principle is that he is not doing it, and you should think well of him. Allah, the Exalted, says (what means): {O you who have believed, avoid much (negative) assumption. Indeed, some assumption is a sin...} [Quran 49:12]
If it is proven that he masturbates or watches pornography, then you should give him advice in a kind manner and clarify to him the danger of what he is doing , as well as the fact that he must repent to Allah of all these sins. Please refer to fatwa 89267 about some ways to treat addiction to pornography and masturbation.
It is incumbent on you as well to repent to Allah of this evil habit. If it happens that you do not repent, then this does not prevent you from forbidding the person who does it. Enjoining good and shunning evil are both obligatory, and the absence of either does not waive the obligation of the other.
Ibn Katheer wrote, "The correct view is that the one who has knowledge should enjoin others to do good even if he does not do it himself."
Ibn Katheer cited the statement of Saʻeed ibn Jubayr which reads, "If the Muslims refrained from enjoining good and forbidding evil until they become free of sin, then no one would enjoin good or forbid evil."
It is blameworthy of a person to forbid others from evil while he is committing it; however, this does not mean that he is a hypocrite. It is more appropriate, though, that he refrains from committing the evil that he forbids people from committing.
Our advice to you is to be patient with your husband, as it is hoped from someone like him that he would refrain from all this, especially after the consummation of the marriage.
It should be noted that a Muslim who is plagued with committing sins should conceal his sins and not disclose them to others. Rather, he should repent to Allah and amend his relation with his Lord, as we have previously underlined in fatwas 121113 and 324169.
Allah knows best.