.The social media sites titan is spending billions on artificial intelligence and products for digital and enhanced reality.