Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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?

— asked May 10th 2010 by Phi Chong
  • events
  • facebook
  • iphone
  • login
  • loginbutton
0 Comments

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.

    — answered May 10th 2010 by Kevin Whinnery
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.