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

The Archive Base Latest Questions

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

Hi I have integrated Facebook SDK for an iOS 6 app.The Facebook authentication &

  • 0

Hi I have integrated Facebook SDK for an iOS 6 app.The Facebook authentication & sharing works perfectly but there are no provision to close the FB Dialogue box.ie. When FB Dialogue box opens,it will be closed only after authentication success.No provision to close or navigate back.How can I make a close button.The code snippet I am using has been shown below.Thanks in Advance.

-(NSDictionary *)shareFacebook
{

    NSDictionary *userInfo;
    if (FBSession.activeSession.isOpen)
    {

        if (FBSession.activeSession.isOpen)
        {

            [self.closeButton setHidden:NO];
            [FBRequestConnection startForMeWithCompletionHandler:^(FBRequestConnection *connection, id<FBGraphUser> user, NSError *error) {

                NSUserDefaults *standardUserDefaults=[NSUserDefaults standardUserDefaults];
                [standardUserDefaults setObject:user forKey:@"fbUserInfo"];



                    [self.manager authenticateUserUsingFB:[user objectForKey:@"email"]];


            }];
        }

    }
    else{
        NSLog(@"fb session not active.");
        [self openSessionWithAllowLoginUI:YES];
    }
    return userInfo;
}

- (void)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {

    NSArray *permissions = [[NSArray alloc] initWithObjects:

                            @"user_photos",
                            @"publish_actions",
                            @"read_stream",
                            @"friends_photos",
                            @"email" ,nil];

    [FBSession setActiveSession:[[FBSession alloc] initWithPermissions:permissions]];


    [[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView

                              completionHandler:^(FBSession *session,

                                                  FBSessionState state,

                                                  NSError *error) {

                                  NSLog(@" state=%d",state);
                                  if(FBSessionStateOpen)
                                  {
                                      [self shareFacebook];
                                  }
                              }];

}
  • 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-15T14:50:13+00:00Added an answer on June 15, 2026 at 2:50 pm

    I know what causes this bug! The button and the icon view (there are two views on the top right corner of the dialog box – a close button and an icon view) are actually exist (you can click it to see) but not visible. This is because the project can’t see actual image files which are located in FBDialog.bundle. You should copy those images from the bundle and add them to project then set images directly. Your init method may look something like this:

     //This is your FBDialog.m file
    - (id)init {
      if (self = [super initWithFrame:CGRectZero]) {
        .........
    
        UIImage* iconImage = [UIImage imageNamed:@"fbicon.png"];
        UIImage* closeImage = [UIImage imageNamed:@"close.png"];
    
        _iconView = [[UIImageView alloc] initWithImage:iconImage];
        [self addSubview:_iconView];
    
        _closeButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
        [_closeButton setImage:closeImage forState:UIControlStateNormal];
        [_closeButton addTarget:self action:@selector(cancel)
          forControlEvents:UIControlEventTouchUpInside];
    
        .........
    

    May be there is a better way to fix this bug but this worked for me.

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

Sidebar

Related Questions

I have integrated Facebook functionality into my applications. By using the link https://github.com/facebook/facebook-ios-sdk ,
I have integrated the facebook in my app using http://sourceforge.net/projects/facebook-bb-sdk , it work fine
I have integrated the Facebook SDK in my app using the official facebook connect
I have integrated Facebook in my app. It works flawlessly in dev environment -
I have downloaded the facebook android sdk and integrated to my app as mentioned
I have integrated Facebook using library in my previous application and it works fine
I've integrated the Facebook sso for iOS and have the single sign on implemented
I have integrated Facebook into my site, but where is the best place to
This is the first time I have integrated facebook into an app so I
I have integrated the Facebook-sdk successfully in to my appplication. Now i am going

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.