If it's a problem that Facebook uncovers someone who's gay in Tehran, then that is only because that persons cyberspace identity mimics his meatspace one. If the gay person in Tehran profile doesn't actually link up to a physical person in Tehran, then there's no added danger to anyone.
If it didn't identify individuals would it be any less useful to marketers?
Cyberspace allows him freedom from this oppression.
Hope that makes it clearer.