Appeals court restricts cybersecurity agency’s contact with social media platforms