Triggering the Facebook Login with LoginButton
Here's my code:
case 2:
if (Titanium.Facebook.isLoggedIn()==false)
{
Titanium.Facebook.LoginButton.fireEvent('click', fbButton);
//fbButton.fireEvent('click');
//Ti.UI.createAlertDialog({title:'Facebook', message:'Login before uploading your photo'}).show();
//return;
}
else{
if (!Titanium.Facebook.hasPermission("photo_upload"))
{
Titanium.Facebook.requestPermission("photo_upload",function(evt)
{
if (evt.success)
{
uploadPhoto();
}
});
}
else
{
uploadPhoto();
}
}
I've trying to trigger the facebook login window through a button in an options dialog. Is this even possible?
1 Answer
-
Accepted Answer
I don't believe it is currently possible to programmatically initiate a Facebook login. I think the best you can currently do is prompt the user to click the Facebook Connect login button.