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 9165125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:50:29+00:00 2026-06-17T14:50:29+00:00

In my iphone app redirect to facebook login like facebook app when clicking a

  • 0

In my iphone app redirect to facebook login like facebook app when clicking a button. After login again redirect to my app.

i’m using this code

NSArray *permissions =
[NSArray arrayWithObjects:@"user_photos", @"friends_photos",@"email", nil];

[FBSession openActiveSessionWithReadPermissions:permissions
                                   allowLoginUI:YES
                              completionHandler:
 ^(FBSession *session,
   FBSessionState state, NSError *error) {

     if(!error)
     {
         NSLog(@" hi im sucessfully lloged in");
     }
 }];
  • 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-17T14:50:30+00:00Added an answer on June 17, 2026 at 2:50 pm

    in your you AppDelegate modify the method

    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url  
    {
    
    NSString *urlString = [url absoluteString];
    
    if ([urlString hasPrefix:@"fb://xxxxxxxxxxxx"]) {
        [FBSession.activeSession handleOpenURL:url];
        returnValue = YES;
    }
    
    return returnValue;
    }  
    

    also

    But keep in mind that this is not triggered in IOS 6.In ios 6 the following method will be triggered.

     - (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
     sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
    
    return [FBSession.activeSession handleOpenURL:url];
     }
    

    If the state of your session changes due to login or disconnect FBsession calls the following method and you should handle your cases.

    - (void)sessionStateChanged:(FBSession *)session
                      state:(FBSessionState)state
                      error:(NSError *)error {
    switch (state) {
        case FBSessionStateOpen: {
            //update permissionsArrat
            [self retrieveUSerPermissions];
    
            if (!needstoReopenOldSession) {
                //First User information
                [self getUserInformation:nil];
            }
    
            NSNotification *authorizationNotification = [NSNotification notificationWithName:facebookAuthorizationNotification object:nil];
            [[NSNotificationCenter defaultCenter] postNotification:authorizationNotification];
    
        }
        case FBSessionStateClosed: {
            break;
        }
        case FBSessionStateClosedLoginFailed: {
            [FBSession.activeSession closeAndClearTokenInformation];
            break;
        }
        default:
            break;
    }
    
    if (error) {
        NSNotification *authorizationNotification = [NSNotification notificationWithName:faceBookErrorOccuredNotification object:nil];
        [[NSNotificationCenter defaultCenter] postNotification:authorizationNotification];
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Iphone app i'm using facebook sdk 3.1. I want to redirect facebook
How to develop an iPhone app using its webviewer? Like in Andriod we can
My iPhone app can't seem to use soft keyboards that doesn't use the US-like
My iPhone app started logging this error: lo->hi recycling invariant violated! followed by: Program
My iPhone app formats an NSDecimalNumber as a currency using setCurrencyCode, however another screen
I have an app, and I'd like to redirect the users to different pages
My iPhone app is creating a binary file (up to 20MB). I would like
My iPhone app is getting ready to go to production and we like to
i developing an iphone app with login to mysql db by php api ,
I am developing an iPhone application that deals with Facebook. I am using the

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.