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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:12:58+00:00 2026-06-08T18:12:58+00:00

I followed the login instructions for my native iOS app here https://developers.facebook.com/docs/mobile/ios/build/ I have

  • 0

I followed the login instructions for my native iOS app here https://developers.facebook.com/docs/mobile/ios/build/

I have everything facebook in the AppDelegate in application:didFinishLaunchingWithOptions:

facebook = [[Facebook alloc] initWithAppId:@"xyzabc" andDelegate:self];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

if ([defaults objectForKey:@"FBAccessTokenKey"] 
    && [defaults objectForKey:@"FBExpirationDateKey"]) {
    facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
    facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
}


if (![facebook isSessionValid]) {
    NSArray *permissions = [[NSArray alloc] initWithObjects:
                            @"publish_stream", 
                            nil];
    [facebook authorize:permissions];

}

The problem is that my app opens and I require people to be logged in to facebook to use the features in my app. Apple rejected me saying the Facebook feature should be optional rather than forced (listed under rejection reason 17.2).

I was just wondering if I can keep most everything in the app delegate, but put the

    if (![facebook isSessionValid]) {
        NSArray *permissions = [[NSArray alloc] initWithObjects:
                                @"publish_stream", 
                                nil];
        [facebook authorize:permissions];
}

somewhere else (like when a login to facebook button is pressed). If this is the case, should the facebook documentation be updated so no one else gets rejected? Or maybe I missed something where I can keep that in the app delegate, but call something else to make login optional?

Thanks in advance for your help!

  • 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-08T18:12:59+00:00Added an answer on June 8, 2026 at 6:12 pm

    What I did to solve this is I moved all the Facebook code from -applicationDidFinishLaunching to a custom method -createFBInstance that I called from a UIViewController whenever a UIButton was pressed so now the user only logs in to Facebook when a button is clicked and the app works great! Just make sure you only use the methods from the FBSessionDelegate inside your delegate I could never make it work in any other class. I also opened up the login web page in a web view inside the app so it looks much nicer.

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

Sidebar

Related Questions

I followed the instructions here , and it works fine, when the Facebook App
So I've followed the instructions in all the other questions. I did this: https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
I followed the instructions on source.android.com to build the Android framework, but when I
[Refer to https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Markers] I followed instructions for creating a GMap sidebar. This is not
I have followed the instructions here . To cut a long story short, I
I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but
I followed the instructions given in the link: http://blog.avirtualhome.com/how-to-compile-a-new-ubuntu-11-04-natty-kernel/ for building a custom kernel
I used a login script tutorial here: http://www.astahost.com/info/tilltf-simple-login-script-simple-secure-login-script.html and when I clocked login, there
I am trying to implement Facebook Login functionality to my website. I followed the
I have followed the instructions in SSL with Self Hosted WCF Service . When

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.