A German court ruled on Thursday that the social media platform must allow researchers to gather election data.