They're a publicly traded company with a "big-4" auditing firm to make sure that doesn't happen. The law is very clear on what counts as CapEx and OpEx. Obviously, companies occasionally outsmart (or team up with) their auditors to defraud the public, but the vast majority follow GAAP and succeed or fail on the merit of their business.
It's OpEx either way, right? Ideally the firm would be able to point at x, y, and z innovative and profitable new services, and say that's why we spend so much on R&D. It's not clear to me that Twitter can do that. So, an investor would be justified in suspecting that not all R&D expenditures are valid.