Why would Putin prevent it from happening? Your messiah Obama is the only one who could have stopped it, if he even could. It's not against the law for Russians to post on Facebook.
Show us on the doll where Putin touched you and made you vote for Trump.
No, Obama could do nothing to prevent tampering in the 2018 and beyond elections, that's up to Trump.
As far as 2016, he kicked out quite a few Russians but not much he could do about the election, they had already hacked the Democrats and I don't think enough was known about the ads they were putting up on facebook at the time. I just wish he spoke up more.