aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Bernstein2012-06-23 18:01:45 -0400
committerNikita Bernstein2012-06-23 18:01:45 -0400
commit21a9c3e2bf812141ee3178b657db51909d8d59df (patch)
tree1e1c0289ceb8905d480976c76d842fcdc3ca3f15
parent38f22380eb69129c2dcc89a6bf68ed56573b086a (diff)
downloadLikeFeed-21a9c3e2bf812141ee3178b657db51909d8d59df.tar.bz2
Necessary to work with our FB
-rw-r--r--.DS_Storebin0 -> 6148 bytes
-rw-r--r--Resources/app.js18
-rw-r--r--tiapp.xml1
3 files changed, 19 insertions, 0 deletions
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..16d875f
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/Resources/app.js b/Resources/app.js
index b10ea40..d5d4cb3 100644
--- a/Resources/app.js
+++ b/Resources/app.js
@@ -26,7 +26,25 @@ var label1 = Titanium.UI.createLabel({
width:'auto'
});
+// Don't forget to set your appid and requested permissions, else the login button
+// won't be effective.
+Titanium.Facebook.appid = '258369447595838';
+Titanium.Facebook.permissions = ['publish_stream'];
+Titanium.Facebook.addEventListener('login', function(e) {
+ if (e.success) {
+ alert('Logged in');
+ }
+});
+Titanium.Facebook.addEventListener('logout', function(e) {
+ alert('Logged out');
+});
+
+// add the button. Note that it doesn't need a click event or anything.
+var fb_button = Titanium.Facebook.createLoginButton({ top: 50, style: 'wide' });
+//Titanium.UI.currentWindow.add();
+
win1.add(label1);
+win1.add(fb_button);
//
// create controls tab and root window
diff --git a/tiapp.xml b/tiapp.xml
index 6a8f579..9cc4a2f 100644
--- a/tiapp.xml
+++ b/tiapp.xml
@@ -23,6 +23,7 @@
<fullscreen>false</fullscreen>
<navbar-hidden>false</navbar-hidden>
<analytics>true</analytics>
+ <property name="ti.facebook.appid">258369447595838</property>
<guid>ccd110bb-8710-4380-ad4a-94d93e18d62a</guid>
<iphone>
<orientations device="iphone">