Cyberbullying has become a major problem along with the increase of communication technologies and social media become part of daily life. Cyberbullying is the use of communication tools to harass or harm a person or group. Especially for the adolescent age group, cyberbullying causes damage that is thought to be suicidal and poses a great risk. In this study, a model is developed to identify the cyberbullying actions that took place in social networks. The model investigates the effects of some text mining methods such as pre-processing, feature extraction, feature selection and classification on automatic detection of cyberbullying using datasets obtained from Formspring.me, Myspace and YouTube social network platforms. Different classifiers (i.e. multilayer perceptron (MLP), stochastic gradient descent (SGD), logistic regression and radial basis function) have been developed and the effects of feature selection algorithms (i.e. Chi2, support vector machine-recursive feature elimination (SVM-RFE), minimum redundancy maximum relevance and ReliefF) for cyberbullying detection have also been investigated. The experimental results of the study proved that SGD and MLP classifiers with 500 selected features using SVM-RFE algorithm showed the best results (F_measure value is more than 0.930) by means of classification time and accuracy.