Good questions, Hazem! It's true, "would + have + past participle" is used for hypothetical past situations i.e. they didn't really happen. For example: "I would have moved to Europe if I had gotten the chance!"
In this situation, it's used in a more abstract way. In fact, it's not even the best use of English grammar, in my opinion. Nevertheless, it means "may have," like, "Maybe you shared posts with friends of friends. Maybe you didn't. However, if you DID, they will become private." In this situation, it's possible that it DID happen.