aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnqi Xu2012-06-23 23:04:46 -0400
committerAnqi Xu2012-06-23 23:04:46 -0400
commit559a5d40bc676a5def004196834625e76ad6182a (patch)
tree64b97581237bb5dd4891b416139e6f4cbd854129
parent2a49ea0a75e3ee40c8333ccf0422a1309d640b2a (diff)
downloadLikeFeed-559a5d40bc676a5def004196834625e76ad6182a.tar.bz2
Updated debug sample code for hooking up FQL to display
-rw-r--r--Resources/friendship/core/FacebookFQL.js9
-rw-r--r--Resources/friendship/ui/LikeList.js9
-rw-r--r--tiapp.xml2
3 files changed, 9 insertions, 11 deletions
diff --git a/Resources/friendship/core/FacebookFQL.js b/Resources/friendship/core/FacebookFQL.js
index 7c4e8ca..99d64f6 100644
--- a/Resources/friendship/core/FacebookFQL.js
+++ b/Resources/friendship/core/FacebookFQL.js
@@ -24,16 +24,15 @@
fs.core.handleAllFriendPostsFQL = function(result) {
if (result.success) {
var postsList = JSON.parse(result.result);
-
+
+ /*
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.");
-
+ 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/LikeList.js b/Resources/friendship/ui/LikeList.js
index 7b93e34..fe7555b 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -30,12 +30,11 @@
return row;
}
- fs.ui.addItems = function( items )
+ fs.ui.addItems = function( list )
{
- for( item in items ){
- Ti.API.info( item );
- }
-
+ for ( key in list.list ) {
+ Ti.API.info( list.list[key] );
+ }
}
fs.ui.createLikeList = function() {
diff --git a/tiapp.xml b/tiapp.xml
index 9cc4a2f..6c7786d 100644
--- a/tiapp.xml
+++ b/tiapp.xml
@@ -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>