diff options
| author | Nikita Bernstein | 2012-06-23 22:53:43 -0400 |
|---|---|---|
| committer | Nikita Bernstein | 2012-06-23 22:53:48 -0400 |
| commit | 2a49ea0a75e3ee40c8333ccf0422a1309d640b2a (patch) | |
| tree | 41070042a0dcd944c85684656ffe100da4ac17ec | |
| parent | a39d0d7749104c16e269f48059d43d7b8ec15ca1 (diff) | |
| download | LikeFeed-2a49ea0a75e3ee40c8333ccf0422a1309d640b2a.tar.bz2 | |
Trying to get the FB with rows working
| -rw-r--r-- | Resources/friendship/core/FacebookFQL.js | 9 | ||||
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/Resources/friendship/core/FacebookFQL.js b/Resources/friendship/core/FacebookFQL.js index bd3e96e..7c4e8ca 100644 --- a/Resources/friendship/core/FacebookFQL.js +++ b/Resources/friendship/core/FacebookFQL.js @@ -24,13 +24,16 @@ fs.core.handleAllFriendPostsFQL = function(result) { if (result.success) { var postsList = JSON.parse(result.result); - Ti.API.fireEvent("processPosts", postsList); - /* + Ti.API.info(postsList.length); Ti.API.info(postsList[0].name); Ti.API.info(postsList[0].page_id); Ti.API.info(postsList[0].website); - */ + + Ti.API.fireEvent("processPosts", postsList); + + Ti.API.info("Post fire event."); + } else if (result.error) { //Ti.API.info("ERROR: " + result.error); // TODO: remove Ti.API.fireEvent("processFQLError", {what:result.error}); diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index 9ba9bd5..7b93e34 100644 --- a/Resources/friendship/ui/LikeList.js +++ b/Resources/friendship/ui/LikeList.js @@ -30,6 +30,14 @@ return row; } + fs.ui.addItems = function( items ) + { + for( item in items ){ + Ti.API.info( item ); + } + + } + fs.ui.createLikeList = function() { var ll_view = Ti.UI.createTableView(); @@ -43,6 +51,8 @@ ll_view.appendRow( create_row( 'OMG, I like totally like Skrillex.') ); ll_view.appendRow( create_row( 'Seriously, this is amazing. You totally need to party.') ); + Ti.API.addEventListener( "processPosts", fs.ui.addItems ); + return ll_view; }; })(); |
