The authors hypothesize that textual information posted on personal pages on social media reflects the political views of users to some extent. Therefore, this textual information can be used to predict political views on social media. The authors conduct experiments on textual data from user pages and test two machine learning methods to classify pages that declare different political preferences. To undertake a study, the authors collected anonymous open textual data of users of the VKontakte social network (the number of pages is 10 123). Data collection was carried out using the VKontakte Application Programming Interface (VK API). As a result of the analysis of the collected data, the authors discovered two types of textual information. The first is a text filled by the user by selecting one of several possible values (binary or categorical variables). The field "Political Views" is one of these text fields, it provides nine options for selection. The second type of text information includes information entered by the user in an arbitrary form (interests, activities, etc.). The authors trained and tested two machine learning models to predict users' political views based on the remaining text information from their pages: a) linear support vector classifier using text representations from the bag-of-words model; b) neural network using Multilingual BERT text embeddings. The results show that the models sufficiently successfully perform binary classification of users who have polar political views (for example, communists - libertarians, communists - ultra-conservatives). Nevertheless, the results for the groups of users that have close political views are significantly lower. In addition, the authors investigated the assumption that users often indicate "indifferent" political views as "moderate". The authors classified the groups of users who declare indifferent or moderate views (the two largest categories in our dataset) and users who indicated other political preferences. The results demonstrate a sufficiently high performance for the classification of custom pages based on these two political views.