An online social network (OSN) is a social structure made up of a set of users that are interested to communicate with each other in an online environment in order to share information. Social networking services (SNSs) are web-based platforms for building OSNs. SNSs are increasingly threatened by social bots that are fake or compromised user accounts with malicious intent, which mimic the behavior of legitimate users to evade detection. A social botnet refers to a group of social bots under the control of a single botmaster, which collaborate to conduct the same malicious activities. Using social botnets, spammers are now able to flood news and political websites with tens of thousands of comments. In recent years, there has been a growing interest in designing advanced techniques to automatically detect social botnets in an SNS. The techniques often rely on either examining the structure of the underlying social graph or analyzing the social behavior of users to discriminate social bots from legitimate users. While all the techniques have shown promising results, they often suffer from slow convergence or inability to detect social bots that mimic the sophisticated behavior of legitimate users. In this paper, we address these shortcomings by presenting SocialBotHunter, a semi-supervised collective classification technique that combines the structural information of the social graph with the information on the social behavior of users in a unified manner, in order to detect social botnets in a Twitter-like SNS. The results of our experiments show that SocialBotHunter is able to accurately detect social bots involved in distributing social spam, also known as social spambots, with a low false positive rate and an acceptable detection time.