diff options
| author | Nikita Bernstein | 2012-06-23 18:01:45 -0400 |
|---|---|---|
| committer | Nikita Bernstein | 2012-06-23 18:01:45 -0400 |
| commit | 21a9c3e2bf812141ee3178b657db51909d8d59df (patch) | |
| tree | 1e1c0289ceb8905d480976c76d842fcdc3ca3f15 | |
| parent | 38f22380eb69129c2dcc89a6bf68ed56573b086a (diff) | |
| download | LikeFeed-21a9c3e2bf812141ee3178b657db51909d8d59df.tar.bz2 | |
Necessary to work with our FB
| -rw-r--r-- | .DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | Resources/app.js | 18 | ||||
| -rw-r--r-- | tiapp.xml | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..16d875f --- /dev/null +++ b/.DS_Store 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 @@ -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"> |
