War in Ukraine, rising interest rates and supply-chain disruption are weighing on the social media company as it plows money into R&D.