According to study sudents with mental illness more likely use social networking sites.
Study does not say that SNSs causes mental illness but increase.
There are several factors that may be responsible for mental illness:
exposure to chemicals during pregnancy,
Inheritance of mental illness,
psychological trauma (loss of a parent, sexual abuse, negligence...)
In my opinion SNSs would go into the category of environmental stressors and therefore can trigger a mental illness or if there is already a push over the edge.