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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:17:36+00:00 2026-06-09T16:17:36+00:00

I am using the facebook SDK to login to my app. If the user

  • 0

I am using the facebook SDK to login to my app. If the user is not logged in, the login VC modally appears. Once the user has tapped log in, it alerts the App Delegate if the login was successful. If it was, I want to dismiss the modal login VC. How do I do this from the app delegate?

  • 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-09T16:17:37+00:00Added an answer on June 9, 2026 at 4:17 pm

    The appDelegate needs some way to know who the hosting viewController is, so it can send the dismiss message. You need to figure out some way to make this happen. One way would be to define an ivar on the appDelegate “callDismissOnMeIfFaceBookFails”, and set it when you are in this situation, otherwise its nil.

    Note if its nil, the appDelegate can send the dismiss message with no overhead no problems! Use nil messaging to your advantage (I use it all the time). [Aside: I see so much code “if(obj) [obj message];” Don’t do the if – just send the message – if obj is nil it has no effect and is handled efficiently!]

    EDIT:

    So you have a class AppDelegate. In the #interface define a property:

    @property (nonatomic, strong) UIViewController *callDismissOnMeIfFaceBookFails;
    

    and in the implementation you @synthesize it. Define a method:

    - (void)dismissLoginView
    {
      [callDismissOnMeIfFaceBookFails dismissModalViewControllerAnimated:YES];
      callDismissOnMeIfFaceBookFails = nil; // don't need it now, this unretains it
    }
    

    So, before the modal view controller is presented, the presenting object sets the appDelegate property “callDismissOnMeIfFaceBookFails” to itself.

    When the user has successfully logged in, the login object sends the message to appDelegate telling it to dismissLoginView.

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

Sidebar

Related Questions

In my Android app, I log in using the Facebook SDK and display posts
Background: Using Facebook PHP SDK v 2.1.2 cookieSupport = true App on Facebook has
I'm using Facebook's JavaScript SDK and trying to determine if the user is logged
I am using Facebook SDK in hackbook and tried to login and do all
I'm using the Facebook C# SDK to allow users to log in to my
Using the PHP sdk I'm signing users into my site with Facebook log in.
I am using facebook PHP SDK. After the user allows my application, facebook redirects
I'm using the Facebook SDK to allow users to share content through my app
I am using Facebook JS SDK for integrating Like buttons in my Rails App.
i have implemented facebook log in using Facebook javascript SDK in Jquery mobile ,

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.