Created
October 27, 2011 21:03
-
-
Save atypical/1320870 to your computer and use it in GitHub Desktop.
Tumblr User Request
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
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