diff options
| -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_StoreBinary files differ new 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"> | 
