Distraction caused by social networking is very common now a days.It eats up lot of your time and attention. If you donot have control over an urge to look at it frequently, either you need to log out from that platform or set your privacy settings so that people cannot post or tag you. This can reduce your distraction if you are not keen on gossips or not full of curiosity to know what others are up to. If you are considering emergency messages as a necessity then you can have many other options like phone call or smses or less popular networks where the oppurtunity of distraction is low.
If i have to give one word solution to this then that word would be “self control”.