The family of a 12-year-old boy has warned of the "danger" of social media after their son died in an online challenge.