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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:20:26+00:00 2026-05-20T15:20:26+00:00

I am using facebook-ios-sdk in my iphone application. I am using its code, delegate

  • 0

I am using facebook-ios-sdk in my iphone application.

I am using its code, delegate methods in myAppViewController class..

But when I make different class for facebook code…then application crash after login

Code of facebook class

-(void)start{
    NSLog(@"111111111");
    fbAppId = @"205518692797415";

    fbPermissions =  [[NSArray arrayWithObjects:
                           @"read_stream", @"offline_access",nil] retain];

    facebookObj = [[Facebook alloc] initWithAppId:fbAppId];
    NSLog(@"111111111..%@",facebookObj);
}

-(void)login{
    NSLog(@"facebook login...%@",fbAppId);
    [facebookObj authorize:fbPermissions delegate:self];
    NSLog(@"facebook login done..%@",facebookObj);
}

Code of view Controller Class

-(IBAction)facebookBtnAct:(id)sender{
    [bfaceBook login];
}

-(void)awakeFromNib{
    bfaceBook = [[bFacebook alloc] init];
    [bfaceBook start];
    [self.view addSubview:mainScreen];
}

Log of the Application

111111111
111111111..<Facebook: 0x6302270>
facebook login...205518692797415
facebook login done..<Facebook: 0x6302270>
[myAppViewController facebookObj]: unrecognized selector sent to instance 0x6052f20
 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[myAppViewController facebookObj]: unrecognized selector sent to instance 0x6052f20'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x02605b99 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x0275540e objc_exception_throw + 47
    2   CoreFoundation                      0x026076ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x025772b6 ___forwarding___ + 966
    4   CoreFoundation                      0x02576e72 _CF_forwarding_prep_0 + 50
    5   myApp                               0x0000210f -[myAppAppDelegate application:handleOpenURL:] + 53
    6   UIKit                               0x00312423 -[UIApplication _applicationOpenURL:event:] + 189
    7   UIKit                               0x00310729 -[UIApplication _callApplicationResumeHandlersForURL:event:] + 66
    8   UIKit                               0x00321457 -[UIApplication _handleApplicationResumeEvent:] + 1488
    9   UIKit                               0x00320e7a -[UIApplication handleEvent:withNewEvent:] + 4660
    10  UIKit                               0x00318b3c -[UIApplication sendEvent:] + 71
    11  UIKit                               0x0031d9bf _UIApplicationHandleEvent + 7672
    12  GraphicsServices                    0x02dc1822 PurpleEventCallback + 1550
    13  GraphicsServices                    0x02dc18a9 PurpleEventSignalCallback + 42
    14  CoreFoundation                      0x025e6faf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    15  CoreFoundation                      0x0254539b __CFRunLoopDoSources0 + 571
    16  CoreFoundation                      0x02544896 __CFRunLoopRun + 470
    17  CoreFoundation                      0x02544350 CFRunLoopRunSpecific + 208
    18  CoreFoundation                      0x02544271 CFRunLoopRunInMode + 97
    19  GraphicsServices                    0x02dc000c GSEventRunModal + 217
    20  GraphicsServices                    0x02dc00d1 GSEventRun + 115
    21  UIKit                               0x00321af2 UIApplicationMain + 1160
    22  myApp                               0x00001f64 main + 102
    23  myApp                               0x00001ef5 start + 53
  • 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-05-20T15:20:26+00:00Added an answer on May 20, 2026 at 3:20 pm

    Solved Now

    I change the

    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
        return [[viewController facebookObj] handleOpenURL:url];
    }
    

    to

    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
        return [[viewController.bfaceBook facebookObj] handleOpenURL:url];
    }
    

    in AppDelegate class

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

Sidebar

Related Questions

How do I like a page using the new Facebook iOS SDK? (http://github.com/facebook/facebook-ios-sdk) I'm
I'm looking at the sample code for Facebook Connect ( http://github.com/facebook/facebook-ios-sdk ) and noticed
I need to create an iPhone application using Facebook. The facebook FBConnect API supports
I am using Facebook Connect for iPhone and following the official instructions . I
Can I upload photos using Facebook API but not post to wall in Facebook?
I am using facebook.photos.upload to upload photos direct from my application into facebook albums.
I tried using facebook API but once i tried integrating it. I noticed that
I am using facebook PHP SDK to access the friend list include_once(../fb-config.php); include_once(../facebook.php); try{
I am using facebook graph Api for my application where i want the data
I have an iframe Facebook application (using Facebook's new JavaScript API) that needs to

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.