Find file
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (35 sloc) 1.02 KB

Titanium OAuth Client

What is it?

This is a very simple and user friendly OAuth Client for Titanium Mobile. I'm currently using it for Twitter.

How do I use it?



var oauth = new TitaniumOAuth('Consumer key','Consumer secret');

var options = {
            method: 'POST',
            action: '',
            parameters: [
               ['status', 'Just installed an App for the iPhone.']

oauth.requestToken(function() {
    oauth.request(options, function(data) {;

Login and Logout Events

oauth.addEventListener('login', function(){ 
    // Do something

oauth.addEventListener('logout', function(){ 
    // Do something

Checking if you are logged in.

if (oauth.loggedIn()) { 
    // Do something

Login Out