Search code examples
iphonefbconnect

FBConnect is not opening facebook login screen


I am using follwing function to open FBConnect login screen but unfortunate it is not appearing on screen, whenever I am clicking on Login button after animating of Spinner blank screen is coming.

if(appDelegate.session == nil) {

    appDelegate.session = [FBSession sessionForApplication:API_KEY secret:SECRET_KEY delegate:self];

}
if(loginButton == nil) {
     self.loginButton = [[[FBLoginButton alloc] init] autorelease];
     loginButton.frame = CGRectMake(0, 0, 100, 50);
     [self.view addSubview:loginButton];
}

I have given right value of API_KEY and SECRET_KEY from developer account. Please look attached image.

enter image description here


Solution

  • Use FBConnect only if it uses Facebook GraphApi, else other api's wont be working.

    Why are you using old FB Sdk, use the new iOS SDK 3.0, it very simple to use. Also FB has provided lots of sample app. Get the new sdk here.

    And also new Graph Api's doesn't require secret key.