Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:24:40+00:00 2026-05-24T08:24:40+00:00

I followed this guide and I’ve created my app successfully with Facebook integration. What’s

  • 0

I followed this guide and I’ve created my app successfully with Facebook integration.

What’s the problem?

When the user has to do the login, the app quits in the browser (or in Facebook app, if is installed)

How do I keep authentication entirely in-app?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:24:41+00:00Added an answer on May 24, 2026 at 8:24 am

    The point of the oAuth login is that it doesn’t happen within your application. It uses fast-app switching to perform the authentication in a trusted environment (either Safari or the Facebook application).

    However, you can modify Facebook.m to do the authentication within your application, but you user’s credentials will not be remembered. You can see that if your iOS device doesn’t support multi-tasking, there is a backup login dialog.

    Excerpt from Facebook.m (around line 160):

    if ([device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]) {
        if (tryFBAppAuth) {
          NSString *scheme = kFBAppAuthURLScheme;
          if (_localAppId) {
            scheme = [scheme stringByAppendingString:@"2"];
          }
          NSString *urlPrefix = [NSString stringWithFormat:@"%@://%@", scheme, kFBAppAuthURLPath];
          NSString *fbAppUrl = [FBRequest serializeURL:urlPrefix params:params];
          didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
        }
    
        if (trySafariAuth && !didOpenOtherApp) {
          NSString *nextUrl = [self getOwnBaseUrl];
          [params setValue:nextUrl forKey:@"redirect_uri"];
    
          NSString *fbAppUrl = [FBRequest serializeURL:loginDialogURL params:params];
          didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
        }
    }
    
    // If single sign-on failed, open an inline login dialog. This will require the user to
    // enter his or her credentials
    if (!didOpenOtherApp) {
        [_loginDialog release];
        _loginDialog = [[FBLoginDialog alloc] initWithURL:loginDialogURL
                                          loginParams:params
                                             delegate:self];
        [_loginDialog show];
    }
    

    If you remove the first conditional and it’s containing code and set didOpenOtherApp to NO, you can get the behavior you are looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started up a completely new Rails and Facebook app and followed this guide
I have followed this guide: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html I have created a maven-plugin project hello-maven-plugin with
I followed this guide as an attempt to write a login script for my
So I have followed This guide and used a simple printing python file. Problem
I followed this guide here perfectly and have gone through it again but when
I have followed this guide to install Solr in TomCat running on Windows Server
I followed this tutorial to implement facebook into my application. All I want is
I followed this guide: http://wiki.unto.net/setting-up-clojure-and-slime Which walked me through the steps of building Clojure
My site was working fine until I followed this guide, http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-9.10 to set up
I followed this guide http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php to set up the sdl image extension but now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.