A security researcher found a bug in a Facebook ad platform, which gave him access to the company’s internal infrastructure.