Skip to content

Instantly share code, notes, and snippets.

@atypical
Created October 27, 2011 21:03
Show Gist options
  • Save atypical/1320870 to your computer and use it in GitHub Desktop.
Save atypical/1320870 to your computer and use it in GitHub Desktop.
Tumblr User Request
function getUserInfo(){
var tokenKey = Ti.App.Properties.getString('TumblrOAuthTokenKey');
var tokenSecret = Ti.App.Properties.getString('TumblrOAuthTokenSecret');
var oauth = OAuth({
consumerKey: 'abababababababababababababababababbababababba',
consumerSecret: 'abababababababababababababababababbababababba'
//You said you have keys, but if yours aren't xauth, let me know and I can pass mine along.
});
oauth.post('http://api.tumblr.com/v2/user/info', {
'oauth_token': tokenKey,
'oauth_token_secret': tokenSecret
}, successCallback, failureCallback);
function successCallback(response)
{
Ti.API.info('User Info response text: '+response.text);
}
function failureCallback(response)
{
Ti.API.info('Something bad happened'+ response.text);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment