Skip to content

Instantly share code, notes, and snippets.

@atypical
Created October 29, 2011 21:50
Show Gist options
  • Save atypical/1325141 to your computer and use it in GitHub Desktop.
Save atypical/1325141 to your computer and use it in GitHub Desktop.
example 2
twitter.userTimeline(function(data) {
var returnedParams = JSON.parse(data.text);
Ti.API.info('returnedParams: '+returnedParams);
function success(data)
{
Ti.API.info('Response text: '+JSON.parse(data.text));
}
function failure(data)
{
Ti.API.info('Something bad happened: '+ JSON.parse(data.text));
};
});
}
@bytespider
Copy link

I think you're code needs to be more like:

function success(data)
{
    Ti.API.info('Response text: '+JSON.parse(data.text));
}

function failure(data)
{
    Ti.API.info('Something bad happened: '+ JSON.parse(data.text));
}

twitter.userTimeline("bytespider", null, success, failure);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment