aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/friendship/core/FacebookFQL.js9
-rw-r--r--Resources/friendship/ui/LikeList.js10
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;
};
})();