small Facebook login window on Titanium 1.6.0.RC1

You must Login before you can answer or comment on any questions.

Hello,

I am currently working on the integration of the new Facebook login button (on Titanium 1.6.0.RC1). The problem is that, for the login, a new window is displayed, and my app is completely hidden by this window.

I would like to open the login view in a small window opened in my application (in order to keep the feeling that the user is still in my app).

Is there a way to do that ?

Thanks, Best regards !

4 Answers

You can disable Facebook SSO and force the old dialog-based login.

Edit

/Library/Application Support/Titanium/mobilesdk/osx/1.6.0.RC1/iphone/Classes/FBConnect/Facebook.m
line 214 (in 1.6.0RC1 - could change in other versions - it's the line in the method authorize:permissions:delegate:) to read:
[self authorizeWithFBAppAuth:NO safariAuth:NO];
Then erase the contents of the build/iphone dir in your Titanium project (make sure not to erase the iphone dir, just erase all of its contents) and then build your app (or run it in the simulator).

— answered 2 years ago by Jonathan Harlap
answer permalink
3 Comments
  • this approach seems a little scary...

    — commented 2 years ago by Aaron Saunders

  • How so? It's true that it's not ideal to have to edit the mobilesdk code, but one of the benefits of an open source system is that you can edit the source if it doesn't do what you want out of the box. If you don't want to lose access to the official version, you can duplicate the entire 1.6.0.RC1 directory (say, call it 1.6.0.RC1-nofacebooksso) and then restart the Titanium Developer application and then you'll see both mobilesdk versions in your project's Edit tab.

    — commented 2 years ago by Jonathan Harlap

  • Why isn't [self authorizeWithFBAppAuth:NO safariAuth:NO] the DEFAULT behavior to start with? Moving an app to the background is very bad UI experience.

    — commented 2 years ago by Roberto Colnaghi

The Titanium.Facebook.dialog(...) method that I use to send a status on Facebook has the format I would like for my login window.

var postContent = {
    link: '',
    name: L('applicationName'),
    message: L('FacebookStatusWindow-status'),
    caption: L('FacebookUtil-caption'),
    picture: photo,
    description: description
};
 
Titanium.Facebook.dialog('feed', postContent, showRequestResult);
Perhaps, the dialog() method also enables to implement a Facebook login window with some well-chosen parameters...

Does someone knows anything about that ?

Aaron...your links no longer work....wondering if you have new ones that show your FB Graph API work?

Thanks... Brian

Your Answer

Think you can help? Login to answer this question!