This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tabGroup = Titanium.UI.createTabGroup(); | |
var win = Titanium.UI.createWindow({ | |
title:'Tab 1', | |
backgroundColor:'#fff' | |
}); | |
var tab1 = Titanium.UI.createTab({ | |
icon:'KS_nav_views.png', | |
title:'Tab 1', | |
window:win | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Titanium | |
Titanium.addEventListener | |
Titanium.fireEvent | |
Titanium.include | |
Titanium.removeEventListener | |
Titanium.userAgent | |
Titanium.version | |
Titanium.API | |
Titanium.API.addEventListener | |
Titanium.API.debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Titanium.UI.setBackgroundColor('#000'); | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var win = Titanium.UI.createWindow({ | |
title:'10 min twitter client', | |
tabBarHidden:true, | |
backgroundColor:'#fff' | |
}); | |
var tab1 = Titanium.UI.createTab({ | |
window:win | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oAuthAdapter.send({ | |
url:'https://api.twitter.com/1/statuses/update.json', | |
parameters:[ | |
['status', '@mogya Hay I got working oAuthAdapter! '+Math.random()] | |
], | |
method:'POST', | |
onSuccess:function(responce){ | |
alert('post succeed'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get timeline | |
oAuthAdapter.send({ | |
url:'https://api.twitter.com/1/statuses/home_timeline.json', | |
parameters:[ | |
], | |
method:'GET', | |
onSuccess:function(response){ | |
alert('got tweets.see info log.'); | |
response = JSON.parse(response); | |
for(var i=0;i<response.length;i++){ |
NewerOlder