|There are several reasons why a computer will shutdown unexpectedly. Without being able to physically see the computer myself it's very hard to diagnose exactly what the issue is.|
Since you do mention that it seems to happen every time you do a specific task, playing a Facebook game, based on my experience I want to say that this very well could be a heat issue.
Every tech is going to have a different opinion, as I did mention that several things could cause this, but for troubleshooting's sake, I would recommend you shut the computer down and clean out all of the dust. Please be sure to hold the fans while you blow them out if you're planning on using compressed air so you don't ruin them!
If that doesn't work, I would recommend going to the OEM's website and updating all of your systems' drivers.
Be sure to let us know what, if anything works!
Law of Logical Argument: Anything is possible if you don't know what you're talking about.