Online social networks (OSNs) are a platform that is used to share digital resources and to communicate with friends through messages in the OSN environment. The sharing of resources requires proper access control management to limit access as per the requirements of the users. Therefore, the privacy concerns in OSN have gained more attention in recent years. Existing solutions provided by the OSNs are to group the friends in static contact lists (e.g., friends, close friends, etc.). However, the contact lists may contain some irrelevant users, therefore, fine-grained access control management is required in these mechanisms. Moreover, in the existing systems, the predefined policies are implemented on a set of users that also include a group of users that may be irrelevant to the resource. In OSNs, privacy settings are managed by the users. However, due to the users' lack of technical knowledge, they are unable to set privacy settings. To palliate these limitations, we propose an automated and dynamic access control management (AD-ACM) to enhance the privacy of text-based resources in OSNs.