I don't think this is possible.
You can't do that at the app level. It has to be something at device level like a restriction setting.
Android restrictions only manage Send/Recive SMS and Outgoing calls.
You may use that to play around with the xml in it to use a custom profile to block but I'm still not sure if that is possible.