Negative experiences online may bring about higher rates of loneliness among social media users, a study says.