Twitter Inc posted a better-than-expected second-quarter revenue on Friday and an uptick in daily users who see advertisements on the site, driven by changes to show users more relevant content.