You can use a Webpages and/or Applications rule to detect social media sites or apps and restrict their usage by using the Total Time Active (min) rule condition. Below is a website-based sample rule that uses these conditions. You can use similar conditions to restrict the social media apps.
1. Create an Activity rule.
2. Select Webpages under the types of activities.
3. Select the users the rule will apply to.
4. Specify the detection conditions for the URL and the Total Time Active options.
5. Select an action to take when the rule is violated. In the example above, we selected a Warn action.