Your girlfriend is processing her feelings about you and your ex, and she’s lashing out at your friends because she is insecure. It’s misplaced anger. That she tells you she has no communication with her own ex, and then promptly goes and friends him on Facebook is her way of continuing to work things out. Don’t jump to hypocrisy just yet — instead, be understanding of her vulnerability. She is jealous and she doesn’t want to lose you, and she’s afraid that she’s not going to be number one with you. If you can get into that mind set of empathy, you don’t have to get defensive, and then offensive and start a fight with her.
Let the ex-boyfriend episode on the internet go if you can. Instead, focus on your relationship with her. If she feels more support from and intimacy with you, I don’t think she’s going to be as worried about your friends befriending your ex. She’s mostly interested in where she stands with you. Her lashing out at your friends and re-connecting with her ex are substitutes for not getting enough from you. If you can, give it to her.