It's definitely because of the Referer header. It has only happened to me when I am linked to a tweet from somewhere else and refreshing always solves the problem. I think Twitter wants you to download their app instead of using your phone's web browser.