Code copied fro gs-accessing-twitter and converted to work with github