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
/* | |
* Copyright 2008 Netflix, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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. | |
}); |
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
userTimeline: function (screenName, sinceId, success, failure, options) | |
{ | |
options = options || {}; | |
var url = OAuth.Twitter.API_URL + | |
OAuth.Twitter.API_VERSION + | |
OAuth.Twitter.API_USER_TIMELINE + '.' + | |
OAuth.Twitter.API_FORMAT; | |
var userId = parseInt(screenName, 10); | |
if (userId == screenName) |
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
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) |
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
userInfo: function (success, failure) | |
{ | |
var url = OAuth.Tumblr.API_URL + | |
OAuth.Tumblr.API_VERSION + | |
OAuth.Tumblr.API_USER_INFO; | |
this.oauth.postJSON(url, success, failure); | |
return this; | |
}, |
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 tumblr = new OAuth.Tumblr({ | |
consumerKey: 'adfasdfasdfasdfasdfas', | |
consumerSecret: 'adfasdfasdfasdfasdfsa' | |
}); | |
function success(data) |
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
"posts":[ | |
{"blog_name":"fuckyeahtattoos", | |
"id":12132753374, | |
"post_url":"http:\/\/fyeahtattoos.com\/post\/12132753374\/a-dog-eared-life-is-part-of-a-poem-my-dad-wrote", | |
"type":"photo", | |
"date":"2011-10-30 21:37:05 GMT", | |
"timestamp":1320010625, | |
"format":"html", | |
"reblog_key":"07oX4N30", | |
"tags":["tattoos","submission"], |
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 parseTheDashboardData(resp){ | |
var httpStatus = resp.meta.status, | |
httpMessage = resp.meta.msg, | |
dashboardPostsArray = resp.response.posts; | |
for (var i = 0; i < dashboardPostsArray.length; i++){ | |
var current=dashboardPostsArray[i]; | |
var blogName = current.blog_name, | |
blogID = current.id, |
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 parseTheDashboardData(resp){ | |
var httpStatus = resp.meta.status, | |
httpMessage = resp.meta.msg, | |
dashboardPostsArray = resp.response.posts; | |
for (var i = 0; i < dashboardPostsArray.length; i++){ | |
var current=dashboardPostsArray[i]; | |
var blogName = current.blog_name, | |
blogID = current.id, |
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 front = Ti.UI.createImageView({ | |
backgroundImage: _args.data.image || '', | |
backgroundColor:"#000", | |
borderWidth:3, | |
borderColor:'#FFF', | |
top:0, | |
bottom:0, | |
left:0, | |
right:0, | |
zIndex:1, |
OlderNewer