Ios – fbDidLogin never called (facebook-ios-sdk)

facebookfacebook-ios-sdkios

I'm using a pop up Facebook dialog for the user login and the publishing of a post on his/her stream

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: apiKey, @"api_key", nil];
[facebook dialog:@"stream.publish" andParams:params andDelegate:self];

It works, but when the user logs in the fbDidLogin method is never called.
Why?
In this way I can't request the user name and the access token is always null.

EDIT

With the october facebook api I have in part resolved my problem.

Best Answer

I just had the same problem and solved it. You NEED to implement

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url

in your app delegate class, not your custom UIViewController or any other class. Then direct the call from your app delegate to whatever controller is responsible for your Facebook.

Related Topic