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

  • SEARCH
  • Home
  • 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 8874003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:36:42+00:00 2026-06-14T18:36:42+00:00

I am integrating facebook login in my application. When I request the user for

  • 0

I am integrating facebook login in my application.

When I request the user for permissions the default UI get presented to him in order to accept the permissions, and then when he clicks on “okay” it will return from the ui to my app in order to continue.

However the default Permission UI remains open in the browser (if I quit the application and open the browser I still see the permission UI that was presented to him earlier.
Is there a way I can close the page in the browser after the user gives permission?

Hope I was clear

This is the code I am using:

This method will show the user the facebook login page in order to get his permission

-(BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
    NSArray *permissions = [[NSArray alloc] initWithObjects:
                            @"user_location",
                            @"user_birthday",
                            nil];
    return [FBSession openActiveSessionWithReadPermissions:permissions
                                          allowLoginUI:allowLoginUI
                                     completionHandler:^(FBSession *session,
                                                         FBSessionState state,
                                                         NSError *error) {
                                         [self HandleLogin];
                                     }];
}

Then if login and permission successful

- (void)HandleLogin {
    if (FBSession.activeSession.isOpen) {

        [FBRequestConnection
         startForMeWithCompletionHandler:^(FBRequestConnection *connection,
                                       id<FBGraphUser> user,
                                       NSError *error) {
             //DO SOMETHING WITH THE USER INFO
         }];
    }
}

The code to process the return from the Facebook app

- (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
    // attempt to extract a token from the url
   return [FBSession.activeSession handleOpenURL:url]; 
}
  • 1 1 Answer
  • 0 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-06-14T18:36:43+00:00Added an answer on June 14, 2026 at 6:36 pm

    Facebook SDK is pretty problematic, I’d say. Personally, I had displeasure to integrate FB picture sharing into several projects (while their developers released several new SDKs). I don’t know, why browser redirection becomes popular, honestly, I don’t like it. Generally, I don’t think that it is possible to somehow clear this unwanted content from your browser without opening new url from application since it is not a solution. What I’d suggest is to force FB SDK to use WebView. In last version I used, this is set when you create new session with custom behavior. Code should be like this or pretty similar:

    [[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView
                                  completionHandler:^(FBSession *session, FBSessionState status, NSError *error)handler]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am integrating facebook login in my application. I jsut want the user to
I'm currently integrating Facebook in my application and I'm currently at the point where
I am integrating facebook with android.when i give referance to the facebook sdk then
I am integrating OmniAuth Facebook on my site. I had it working but then
I am developing an Android application. Here I'm integrating the facebook api to my
I'm working on integrating Facebook with my iPhone/iOS application and I want to know
I'm try to get facebook integration into my cordova 1.8.1 application. I've tried several
I sharing message in Facebook by integrating sharekit in my iPhone application.I have written
In my application I am integrating with Facebook and I do: Log in Facebook
Possible Duplicate: URL Fragment and 302 redirects I am integrating Facebook login into my

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.