Here is an easy way to determine if what you are doing is wrong, in accordance with your relationship with your partner:
Does your partner know everything?
It is usually that simple. If you find yourself hiding things or not telling your partner details (for example, telling him about the flirting at work, but failing to mention this FB wanking situation and wanting to help finish the guy off) then its fair to say you are cheating already.
Cheating is not defined as "having intercourse with another person". Cheating is defined as being deceitful to another person about your sexual/romantic behaviour. Everyone has different boundaries in their relationships. Some couples are open, or poly, or swingers and happily indulge sexually and intimately with others, but even these relationships have "rules" (Like, you can do everything up to penetration...no penetration allowed). It is not the doing stuff that is cheating, but the doing stuff which you previously agreed not to do. Your relationship "rules". For many people, having a romantic and sexual experience with another via text only is cheating. They may consider it emotional cheating, rather than physical, but it can hurt just as bad. (Imagine discovering texts from your husband to another woman saying things like "I can't stop thinking about you, etc).
So, if you know that it would hurt or upset your partner if he found out about the FB situation, then you are most definitely already crossing the line into cheating.
I agree with others that you might be asking the question "How can I do this and still be on the right side of the line". There is only one way: Tell your partner everything you intend to do beforehand and agree on what is acceptable. Also, pay attention to any "Yeah its okay" that don't sound genuine. You would be surprised how many people will agree for their partner to do this kind of stuff when they really don't want them to. They say yes because they are afraid to lose you. This is why it is important to really hear what is being said.
Personally, if you know it is crossing the line or breaking the rules of your relationship, I wouldn't do it. If you are unhappy though and feel you need this, it might be time to have a good hard think about everything, so you dont end up hurting anyone, including yourself.