Skip to content

Instantly share code, notes, and snippets.

@mattapperson
Created August 23, 2011 22:51
Show Gist options
  • Save mattapperson/1166830 to your computer and use it in GitHub Desktop.
Save mattapperson/1166830 to your computer and use it in GitHub Desktop.
var win = Ti.UI.createWindow();
Titanium.Facebook.appid = "181219095251677";
Titanium.Facebook.permissions = ['publish_stream', 'read_stream', 'offline_access'];
var alertDialog = Titanium.UI.createAlertDialog({
title : 'Facebook',
message : 'You need to login with Facebook',
buttonNames : ['Login Facebook']
});
alertDialog.addEventListener('click', function(e) {
Titanium.Facebook.authorize();
});
alertDialog.show();
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment