A federal appeals court ruled this week that social-media companies could be liable for algorithms they create to promote content to users.