Twitter Inc on Tuesday posted better-than-expected first-quarter revenue and a surprise rise in the number of monthly active users, a sign that the social media platform may be on a sustainable path after a year of stagnant user growth.