Saudi Arabia has detained 46 people over their posts on social media amid a heavy-handed crackdown on dissent in the Arab kingdom.