diff options
| author | Teddy Wing | 2012-06-23 23:21:27 -0400 |
|---|---|---|
| committer | Teddy Wing | 2012-06-23 23:21:27 -0400 |
| commit | d665518a3531b773740c63c9fd0d1a8291cca9aa (patch) | |
| tree | 24348111a5a8f50d34300669e9444a3e89137422 | |
| parent | d71ffcaf85507b00fc4d545f1f1d2ca58283f21e (diff) | |
| parent | e7927e6ac5f1ef096c39360889d6e7fe353e2d2f (diff) | |
| download | LikeFeed-d665518a3531b773740c63c9fd0d1a8291cca9aa.tar.bz2 | |
Merge branch 'master' of github.com:teddywing/LikeFeed
| -rw-r--r-- | .DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | Resources/app.js | 2 | ||||
| -rw-r--r-- | Resources/friendship/core/FacebookFQL.js | 6 | ||||
| -rw-r--r-- | Resources/friendship/ui/ApplicationWindow.js | 2 | ||||
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 9 | ||||
| -rw-r--r-- | tiapp.xml | 2 |
6 files changed, 17 insertions, 4 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..5008ddf --- /dev/null +++ b/.DS_Store diff --git a/Resources/app.js b/Resources/app.js index 3835b41..fb6d46e 100644 --- a/Resources/app.js +++ b/Resources/app.js @@ -1,5 +1,7 @@ Ti.include('/friendship/friendship.js'); +Ti.API.info("Running the app - app.js"); + fs.app.mainTabGroup = fs.ui.createApplicationTabGroup(); // Login switch diff --git a/Resources/friendship/core/FacebookFQL.js b/Resources/friendship/core/FacebookFQL.js index bd3e96e..99d64f6 100644 --- a/Resources/friendship/core/FacebookFQL.js +++ b/Resources/friendship/core/FacebookFQL.js @@ -24,13 +24,15 @@ 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", {list:postsList}); } 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/ApplicationWindow.js b/Resources/friendship/ui/ApplicationWindow.js index fae78d4..14444a2 100644 --- a/Resources/friendship/ui/ApplicationWindow.js +++ b/Resources/friendship/ui/ApplicationWindow.js @@ -1,7 +1,6 @@ (function() { fs.ui.createApplicationTabGroup = function() { var tab_group = Ti.UI.createTabGroup(); - Ti.UI.currentTabGroup = tab_group; var login_button = Ti.Facebook.createLoginButton({ top: 50, @@ -10,6 +9,7 @@ var debug_button = Ti.UI.createButton({title: 'Debug'}); debug_button.addEventListener('click', function(e) { + Ti.API.info('Logged in: ' + JSON.stringify(Ti.Facebook.loggedIn)); if (Ti.Facebook.loggedIn) { fs.core.queryAllFriendPostsFQL(); diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index 7ed3fe2..0894d07 100644 --- a/Resources/friendship/ui/LikeList.js +++ b/Resources/friendship/ui/LikeList.js @@ -30,6 +30,13 @@ return row; } + fs.ui.addItems = function( list ) + { + for ( key in list.list ) { + Ti.API.info( list.list[key] ); + } + } + fs.ui.createLikeList = function() { var ll_view = Ti.UI.createTableView(); @@ -43,6 +50,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; }; })(); @@ -7,7 +7,7 @@ <target device="android">false</target> <target device="blackberry">false</target> </deployment-targets> - <sdk-version>1.6.2</sdk-version> + <sdk-version>2.0.2.GA</sdk-version> <id>com.likefeed.LikeFeed</id> <name>LikeFeed</name> <version>1.0</version> |
