To the OP. Yes, of course Facebook can run experiments ethically, they're doing it all the time. All corporations do - "which color packaging on our box of soap sells more"? Count sales, over, done, next.
They're a corporation, which is a legal entity, so their studies need to be legal, or some government will make it impossible for them to do business.
Can they run experiments "like these" ethically - probably, but defining "ethics" is a lot harder - call the philosophers! According to the ultimate benchmark, Wikipedia, "Ethics, sometimes known as moral philosophy, is a branch of philosophy...".
Facebook's ethics, come from their management and shareholders. If a study is against the law, see above, if goes against their users' wishes, they can just not come back.