Is it permissible to inquire about a potential spouse by looking through their social media without their knowledge?

If social media account is public it is permissible to check it.
If one is accessing things not intended by them for the public that would not be allowed.