Meta shares soar on resilient revenue and $40bn in buybacks