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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:45:29+00:00 2026-06-13T13:45:29+00:00

I am following Getting Started with the Facebook SDK for iOS v3.1 to add

  • 0

I am following Getting Started with the Facebook SDK for iOS v3.1 to add Facebook SDK to my xCode project with Storyboard.

I did all the steps that described there.

We have a HelloFacebookSample in the Sample folder of Facebook SDK. it includes this code:

- (void)viewDidLoad {    
    [super viewDidLoad];

    // Create Login View so that the app will be granted "status_update" permission.
    FBLoginView *loginview = [[FBLoginView alloc] init];

    loginview.frame = CGRectOffset(loginview.frame, 5, 5);
    loginview.delegate = self;

    [self.view addSubview:loginview];

    [loginview sizeToFit];
}

// Post Status Update button handler; will attempt to invoke the native
// share dialog and, if that's unavailable, will post directly
- (IBAction)postStatusUpdateClick:(UIButton *)sender {
    // Post a status update to the user's feed via the Graph API, and display an alert view
    // with the results or an error.
    NSString *name = self.loggedInUser.first_name;
    NSString *message = [NSString stringWithFormat:@"Updating status for %@ at %@",
                         name != nil ? name : @"me" , [NSDate date]];

    // if it is available to us, we will post using the native dialog
    BOOL displayedNativeDialog = [FBNativeDialogs presentShareDialogModallyFrom:self
                                                                    initialText:nil
                                                                          image:nil
                                                                            url:nil
                                                                        handler:nil];
    if (!displayedNativeDialog) {

        [self performPublishAction:^{
            // otherwise fall back on a request for permissions and a direct post
            [FBRequestConnection startForPostStatusUpdate:message
                                        completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                                            [self showAlert:message result:result error:error];
                                            self.buttonPostStatus.enabled = YES;
                                        }];

            self.buttonPostStatus.enabled = NO;
        }];
    }
}

Then sample works fine, but when I want to have it on my own project, I have this problem:

It is successfully added the FBLoginView to my self.view. but when I Login and then want to post something I just go to this page:

enter image description here

  • 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-13T13:45:30+00:00Added an answer on June 13, 2026 at 1:45 pm

    Finally I found the problem. I needed to add these codes to my AppDelegate:

    - (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];
    }
    
    - (void)applicationWillTerminate:(UIApplication *)application {
        // FBSample logic
        // if the app is going away, we close the session object
        [FBSession.activeSession close];
    }
    
    - (void)applicationDidBecomeActive:(UIApplication *)application {
        // FBSample logic
        // We need to properly handle activation of the application with regards to SSO
        //  (e.g., returning from iOS 6.0 authorization dialog or from fast app switching).
        [FBSession.activeSession handleDidBecomeActive];
    }
    

    They were not described in the link. It could be better to let the new users know about these details.

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

Sidebar

Related Questions

I tried to login using facebook followed the facebook tutorial in https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/ to implement
I have tried following the FB mobile web getting started guide at: https://developers.facebook.com/docs/guides/mobile/web/ for
H*wdy all, I'm trying to SlickGrid working, by following the getting started instructions .
Following Getting Started with the AWS SDK for Java tutorial, to run the AwsConsoleApp
I've started an Adroid project with Phonegap following this guide: http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android There is an
I'm quite new to Sencha-touch and I'm following the getting started video on the
I'm new to Rails, and am following the getting started guide on their website.
After following the RoR getting started tutorial, I added another model as: $ rails
I'm following the Boost Getting Started article. I've installed it with Bjam and I
I started getting the following error whenever i use SVN in my server: svn:

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.