refactored code so consumer key and secret can be specified at runtime