No, a contract can't manipulate outside world. Either from or to the outside world.
To get data from the outside world you then need to use what we call oracles.
To make a contract act on the outside world you'll have to set an event listener on your node and run a program when receiving the expected event. This program could then call a web API to place an ad.
Next if you imagine Facebook being able to accept ETH to pay for an ad, then it means that they will probably directly monitor the ethereum chain and provide a smart contract to place ads. You'll then simply have to call this contract from yours and pay the ad using your contract balance. But this is actually not possible with FB as far as I know.
Edit:
As you ask in your comment if a 3rd party could be a relay to place ads on FB, yes posting the ad could probably be done automatically from the 3rd party that hosts the node as FB publish an API . Payment is probably (I didn't check the API in detail) made using bank account or card and your 3rd party should transfer ETH to fiat on his account to keep it positive.
A proof that ad is well placed on FB could be retrieved by another 3rd party actor as an oracle using the activity API. If your ad is not put on FB within a delay you define when calling the ad contract, you could be refunded by the ad contract thus forcing the 3rd party to place your ad in the expected delay.