Ti.include('lib/oauth_adapter.js'); var oAuthAdapter = new OAuthAdapter( 'YOUR CONSUMER SECRET', 'YOUR CONSUMER KEY', 'HMAC-SHA1' ); // load the access token for the service (if previously saved) oAuthAdapter.loadAccessToken('twitter'); //OAuth if need. if (oAuthAdapter.isAuthorized() == false) { var receivePin = function() { oAuthAdapter.getAccessToken('https://api.twitter.com/oauth/access_token'